/****************************************************************************
 * apps/graphics/traveler/src/trv_trigtbl.c
 * Provides look-up tables for trigonometric functions.
 *
 *   Copyright (C) 2014 Gregory Nutt. All rights reserved.
 *   Author: Gregory Nutt <gnutt@nuttx.org>
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 * 3. Neither the name NuttX nor the names of its contributors may be
 *    used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 ****************************************************************************/

/****************************************************************************
 * Included Files
 ****************************************************************************/

#include "trv_types.h"
#include "trv_trigtbl.h"

/****************************************************************************
 * Public Data
 ****************************************************************************/

/* This is TAN lookup table.  NOTES:
 * 1. The index ranges in value from 0 to 3*PI/2-1.
 * 2. Values in the range PI to 2*PI can be obtained from TAN(x) = TAN(x-PI).
 * 3. The values obtain from the table have 12 bits of fraction.
 * 4. COT(x) = 1/TAN(x) = TAN(90-X)
 * 5. TAN(PI/2) is not defined (zero substituted). */

const int32_t g_tan_table[PI + HALFPI + 1] =
{
  0x00000000, 0x0000000d, 0x0000001b, 0x00000028, 0x00000036,
  0x00000043, 0x00000050, 0x0000005e, 0x0000006b, 0x00000079,
  0x00000086, 0x00000094, 0x000000a1, 0x000000ae, 0x000000bc,
  0x000000c9, 0x000000d7, 0x000000e4, 0x000000f2, 0x000000ff,
  0x0000010c, 0x0000011a, 0x00000127, 0x00000135, 0x00000142,
  0x00000150, 0x0000015d, 0x0000016b, 0x00000178, 0x00000186,
  0x00000193, 0x000001a1, 0x000001af, 0x000001bc, 0x000001ca,
  0x000001d7, 0x000001e5, 0x000001f2, 0x00000200, 0x0000020e,

  0x0000021b, 0x00000229, 0x00000237, 0x00000244, 0x00000252,
  0x00000260, 0x0000026d, 0x0000027b, 0x00000289, 0x00000296,
  0x000002a4, 0x000002b2, 0x000002c0, 0x000002ce, 0x000002db,
  0x000002e9, 0x000002f7, 0x00000305, 0x00000313, 0x00000321,
  0x0000032f, 0x0000033d, 0x0000034b, 0x00000359, 0x00000367,
  0x00000375, 0x00000383, 0x00000391, 0x0000039f, 0x000003ad,
  0x000003bb, 0x000003c9, 0x000003d7, 0x000003e6, 0x000003f4,
  0x00000402, 0x00000410, 0x0000041f, 0x0000042d, 0x0000043b,

  0x0000044a, 0x00000458, 0x00000466, 0x00000475, 0x00000483,
  0x00000492, 0x000004a0, 0x000004af, 0x000004bd, 0x000004cc,
  0x000004db, 0x000004e9, 0x000004f8, 0x00000507, 0x00000515,
  0x00000524, 0x00000533, 0x00000542, 0x00000551, 0x0000055f,
  0x0000056e, 0x0000057d, 0x0000058c, 0x0000059b, 0x000005aa,
  0x000005ba, 0x000005c9, 0x000005d8, 0x000005e7, 0x000005f6,
  0x00000606, 0x00000615, 0x00000624, 0x00000634, 0x00000643,
  0x00000653, 0x00000662, 0x00000672, 0x00000681, 0x00000691,

  0x000006a1, 0x000006b0, 0x000006c0, 0x000006d0, 0x000006e0,
  0x000006f0, 0x00000700, 0x00000710, 0x00000720, 0x00000730,
  0x00000740, 0x00000750, 0x00000760, 0x00000771, 0x00000781,
  0x00000791, 0x000007a2, 0x000007b2, 0x000007c3, 0x000007d3,
  0x000007e4, 0x000007f5, 0x00000805, 0x00000816, 0x00000827,
  0x00000838, 0x00000849, 0x0000085a, 0x0000086b, 0x0000087c,
  0x0000088d, 0x0000089f, 0x000008b0, 0x000008c1, 0x000008d3,
  0x000008e4, 0x000008f6, 0x00000908, 0x00000919, 0x0000092b,

  0x0000093d, 0x0000094f, 0x00000961, 0x00000973, 0x00000985,
  0x00000997, 0x000009a9, 0x000009bc, 0x000009ce, 0x000009e1,
  0x000009f3, 0x00000a06, 0x00000a18, 0x00000a2b, 0x00000a3e,
  0x00000a51, 0x00000a64, 0x00000a77, 0x00000a8a, 0x00000a9e,
  0x00000ab1, 0x00000ac4, 0x00000ad8, 0x00000aeb, 0x00000aff,
  0x00000b13, 0x00000b27, 0x00000b3b, 0x00000b4f, 0x00000b63,
  0x00000b77, 0x00000b8b, 0x00000ba0, 0x00000bb4, 0x00000bc9,
  0x00000bde, 0x00000bf3, 0x00000c08, 0x00000c1d, 0x00000c32,

  0x00000c47, 0x00000c5c, 0x00000c72, 0x00000c87, 0x00000c9d,
  0x00000cb3, 0x00000cc9, 0x00000cdf, 0x00000cf5, 0x00000d0b,
  0x00000d22, 0x00000d38, 0x00000d4f, 0x00000d65, 0x00000d7c,
  0x00000d93, 0x00000daa, 0x00000dc2, 0x00000dd9, 0x00000df0,
  0x00000e08, 0x00000e20, 0x00000e38, 0x00000e50, 0x00000e68,
  0x00000e80, 0x00000e99, 0x00000eb2, 0x00000eca, 0x00000ee3,
  0x00000efc, 0x00000f16, 0x00000f2f, 0x00000f49, 0x00000f62,
  0x00000f7c, 0x00000f96, 0x00000fb0, 0x00000fcb, 0x00000fe5,

  0x00001000, 0x0000101b, 0x00001036, 0x00001051, 0x0000106d,
  0x00001088, 0x000010a4, 0x000010c0, 0x000010dc, 0x000010f9,
  0x00001115, 0x00001132, 0x0000114f, 0x0000116c, 0x0000118a,
  0x000011a7, 0x000011c5, 0x000011e3, 0x00001201, 0x00001220,
  0x0000123f, 0x0000125e, 0x0000127d, 0x0000129c, 0x000012bc,
  0x000012dc, 0x000012fc, 0x0000131c, 0x0000133d, 0x0000135e,
  0x0000137f, 0x000013a0, 0x000013c2, 0x000013e4, 0x00001406,
  0x00001429, 0x0000144c, 0x0000146f, 0x00001492, 0x000014b6,

  0x000014da, 0x000014fe, 0x00001523, 0x00001548, 0x0000156d,
  0x00001593, 0x000015b9, 0x000015df, 0x00001606, 0x0000162d,
  0x00001654, 0x0000167c, 0x000016a4, 0x000016cc, 0x000016f5,
  0x0000171e, 0x00001748, 0x00001772, 0x0000179c, 0x000017c7,
  0x000017f2, 0x0000181e, 0x0000184a, 0x00001876, 0x000018a3,
  0x000018d1, 0x000018ff, 0x0000192d, 0x0000195c, 0x0000198b,
  0x000019bb, 0x000019eb, 0x00001a1c, 0x00001a4d, 0x00001a7f,
  0x00001ab2, 0x00001ae5, 0x00001b18, 0x00001b4c, 0x00001b81,

  0x00001bb6, 0x00001bec, 0x00001c23, 0x00001c5a, 0x00001c92,
  0x00001cca, 0x00001d04, 0x00001d3d, 0x00001d78, 0x00001db3,
  0x00001def, 0x00001e2c, 0x00001e69, 0x00001ea7, 0x00001ee6,
  0x00001f26, 0x00001f67, 0x00001fa8, 0x00001feb, 0x0000202e,
  0x00002072, 0x000020b7, 0x000020fd, 0x00002144, 0x0000218b,
  0x000021d4, 0x0000221e, 0x00002269, 0x000022b5, 0x00002302,
  0x00002350, 0x0000239f, 0x000023f0, 0x00002441, 0x00002494,
  0x000024e8, 0x0000253e, 0x00002594, 0x000025ec, 0x00002646,

  0x000026a1, 0x000026fd, 0x0000275b, 0x000027ba, 0x0000281b,
  0x0000287d, 0x000028e1, 0x00002947, 0x000029ae, 0x00002a18,
  0x00002a83, 0x00002af0, 0x00002b5f, 0x00002bd0, 0x00002c43,
  0x00002cb8, 0x00002d2f, 0x00002da8, 0x00002e24, 0x00002ea2,
  0x00002f22, 0x00002fa5, 0x0000302b, 0x000030b3, 0x0000313e,
  0x000031cc, 0x0000325d, 0x000032f0, 0x00003387, 0x00003421,
  0x000034bf, 0x00003560, 0x00003604, 0x000036ac, 0x00003758,
  0x00003807, 0x000038bb, 0x00003973, 0x00003a30, 0x00003af1,

  0x00003bb6, 0x00003c81, 0x00003d51, 0x00003e26, 0x00003f00,
  0x00003fe0, 0x000040c6, 0x000041b2, 0x000042a5, 0x0000439e,
  0x0000449f, 0x000045a6, 0x000046b6, 0x000047cd, 0x000048ed,
  0x00004a15, 0x00004b46, 0x00004c81, 0x00004dc6, 0x00004f15,
  0x00005070, 0x000051d6, 0x00005348, 0x000054c7, 0x00005654,
  0x000057ef, 0x00005999, 0x00005b53, 0x00005d1d, 0x00005efa,
  0x000060e9, 0x000062ec, 0x00006505, 0x00006734, 0x0000697c,
  0x00006bdd, 0x00006e5a, 0x000070f4, 0x000073ad, 0x00007689,

  0x00007988, 0x00007caf, 0x00008000, 0x0000837f, 0x0000872f,
  0x00008b15, 0x00008f35, 0x00009395, 0x0000983b, 0x00009d2d,
  0x0000a273, 0x0000a817, 0x0000ae20, 0x0000b49d, 0x0000bb98,
  0x0000c322, 0x0000cb4d, 0x0000d42d, 0x0000dddb, 0x0000e874,
  0x0000f41d, 0x000100ff, 0x00010f4f, 0x00011f4e, 0x0001314c,
  0x000145b0, 0x00015cfd, 0x000177de, 0x0001973a, 0x0001bc49,
  0x0001e8c0, 0x00021f18, 0x00026304, 0x0002ba57, 0x00032ec4,
  0x0003d1c2, 0x0004c63d, 0x00065dae, 0x00098c92, 0x0013193a,

  0x00000000, 0xffece6ba, 0xfff6736b, 0xfff9a24b, 0xfffb39c2,
  0xfffc2e3d, 0xfffcd13b, 0xfffd45a9, 0xfffd9cfc, 0xfffde0e8,
  0xfffe1740, 0xfffe43b7, 0xfffe68c6, 0xfffe8822, 0xfffea303,
  0xfffeba50, 0xfffeceb4, 0xfffee0b2, 0xfffef0b1, 0xfffeff01,
  0xffff0be3, 0xffff178c, 0xffff2225, 0xffff2bd3, 0xffff34b3,
  0xffff3cde, 0xffff4468, 0xffff4b63, 0xffff51e0, 0xffff57e9,
  0xffff5d8d, 0xffff62d3, 0xffff67c5, 0xffff6c6b, 0xffff70cb,
  0xffff74eb, 0xffff78d1, 0xffff7c81, 0xffff8000, 0xffff8351,

  0xffff8678, 0xffff8977, 0xffff8c53, 0xffff8f0c, 0xffff91a6,
  0xffff9423, 0xffff9684, 0xffff98cc, 0xffff9afb, 0xffff9d14,
  0xffff9f17, 0xffffa106, 0xffffa2e3, 0xffffa4ad, 0xffffa667,
  0xffffa811, 0xffffa9ac, 0xffffab39, 0xffffacb8, 0xffffae2a,
  0xffffaf90, 0xffffb0ea, 0xffffb23a, 0xffffb37f, 0xffffb4ba,
  0xffffb5eb, 0xffffb713, 0xffffb833, 0xffffb94a, 0xffffba5a,
  0xffffbb61, 0xffffbc62, 0xffffbd5b, 0xffffbe4e, 0xffffbf3a,
  0xffffc020, 0xffffc100, 0xffffc1da, 0xffffc2af, 0xffffc37f,

  0xffffc44a, 0xffffc50f, 0xffffc5d0, 0xffffc68d, 0xffffc745,
  0xffffc7f9, 0xffffc8a8, 0xffffc954, 0xffffc9fc, 0xffffcaa0,
  0xffffcb41, 0xffffcbdf, 0xffffcc79, 0xffffcd10, 0xffffcda3,
  0xffffce34, 0xffffcec2, 0xffffcf4d, 0xffffcfd5, 0xffffd05b,
  0xffffd0de, 0xffffd15e, 0xffffd1dc, 0xffffd258, 0xffffd2d1,
  0xffffd348, 0xffffd3bd, 0xffffd430, 0xffffd4a1, 0xffffd510,
  0xffffd57d, 0xffffd5e8, 0xffffd652, 0xffffd6b9, 0xffffd71f,
  0xffffd783, 0xffffd7e5, 0xffffd846, 0xffffd8a5, 0xffffd903,

  0xffffd95f, 0xffffd9ba, 0xffffda14, 0xffffda6c, 0xffffdac2,
  0xffffdb18, 0xffffdb6c, 0xffffdbbf, 0xffffdc10, 0xffffdc61,
  0xffffdcb0, 0xffffdcfe, 0xffffdd4b, 0xffffdd97, 0xffffdde2,
  0xffffde2c, 0xffffde75, 0xffffdebc, 0xffffdf03, 0xffffdf49,
  0xffffdf8e, 0xffffdfd2, 0xffffe015, 0xffffe058, 0xffffe099,
  0xffffe0da, 0xffffe11a, 0xffffe159, 0xffffe197, 0xffffe1d4,
  0xffffe211, 0xffffe24d, 0xffffe288, 0xffffe2c3, 0xffffe2fc,
  0xffffe336, 0xffffe36e, 0xffffe3a6, 0xffffe3dd, 0xffffe414,

  0xffffe44a, 0xffffe47f, 0xffffe4b4, 0xffffe4e8, 0xffffe51b,
  0xffffe54e, 0xffffe581, 0xffffe5b3, 0xffffe5e4, 0xffffe615,
  0xffffe645, 0xffffe675, 0xffffe6a4, 0xffffe6d3, 0xffffe701,
  0xffffe72f, 0xffffe75d, 0xffffe78a, 0xffffe7b6, 0xffffe7e2,
  0xffffe80e, 0xffffe839, 0xffffe864, 0xffffe88e, 0xffffe8b8,
  0xffffe8e2, 0xffffe90b, 0xffffe934, 0xffffe95c, 0xffffe984,
  0xffffe9ac, 0xffffe9d3, 0xffffe9fa, 0xffffea21, 0xffffea47,
  0xffffea6d, 0xffffea93, 0xffffeab8, 0xffffeadd, 0xffffeb02,

  0xffffeb26, 0xffffeb4a, 0xffffeb6e, 0xffffeb91, 0xffffebb4,
  0xffffebd7, 0xffffebfa, 0xffffec1c, 0xffffec3e, 0xffffec60,
  0xffffec81, 0xffffeca2, 0xffffecc3, 0xffffece4, 0xffffed04,
  0xffffed24, 0xffffed44, 0xffffed64, 0xffffed83, 0xffffeda2,
  0xffffedc1, 0xffffede0, 0xffffedff, 0xffffee1d, 0xffffee3b,
  0xffffee59, 0xffffee76, 0xffffee94, 0xffffeeb1, 0xffffeece,
  0xffffeeeb, 0xffffef07, 0xffffef24, 0xffffef40, 0xffffef5c,
  0xffffef78, 0xffffef93, 0xffffefaf, 0xffffefca, 0xffffefe5,

  0xfffff000, 0xfffff01b, 0xfffff035, 0xfffff050, 0xfffff06a,
  0xfffff084, 0xfffff09e, 0xfffff0b7, 0xfffff0d1, 0xfffff0ea,
  0xfffff104, 0xfffff11d, 0xfffff136, 0xfffff14e, 0xfffff167,
  0xfffff180, 0xfffff198, 0xfffff1b0, 0xfffff1c8, 0xfffff1e0,
  0xfffff1f8, 0xfffff210, 0xfffff227, 0xfffff23e, 0xfffff256,
  0xfffff26d, 0xfffff284, 0xfffff29b, 0xfffff2b1, 0xfffff2c8,
  0xfffff2de, 0xfffff2f5, 0xfffff30b, 0xfffff321, 0xfffff337,
  0xfffff34d, 0xfffff363, 0xfffff379, 0xfffff38e, 0xfffff3a4,

  0xfffff3b9, 0xfffff3ce, 0xfffff3e3, 0xfffff3f8, 0xfffff40d,
  0xfffff422, 0xfffff437, 0xfffff44c, 0xfffff460, 0xfffff475,
  0xfffff489, 0xfffff49d, 0xfffff4b1, 0xfffff4c5, 0xfffff4d9,
  0xfffff4ed, 0xfffff501, 0xfffff515, 0xfffff528, 0xfffff53c,
  0xfffff54f, 0xfffff562, 0xfffff576, 0xfffff589, 0xfffff59c,
  0xfffff5af, 0xfffff5c2, 0xfffff5d5, 0xfffff5e8, 0xfffff5fa,
  0xfffff60d, 0xfffff61f, 0xfffff632, 0xfffff644, 0xfffff657,
  0xfffff669, 0xfffff67b, 0xfffff68d, 0xfffff69f, 0xfffff6b1,

  0xfffff6c3, 0xfffff6d5, 0xfffff6e7, 0xfffff6f8, 0xfffff70a,
  0xfffff71c, 0xfffff72d, 0xfffff73f, 0xfffff750, 0xfffff761,
  0xfffff773, 0xfffff784, 0xfffff795, 0xfffff7a6, 0xfffff7b7,
  0xfffff7c8, 0xfffff7d9, 0xfffff7ea, 0xfffff7fb, 0xfffff80b,
  0xfffff81c, 0xfffff82d, 0xfffff83d, 0xfffff84e, 0xfffff85e,
  0xfffff86f, 0xfffff87f, 0xfffff88f, 0xfffff8a0, 0xfffff8b0,
  0xfffff8c0, 0xfffff8d0, 0xfffff8e0, 0xfffff8f0, 0xfffff900,
  0xfffff910, 0xfffff920, 0xfffff930, 0xfffff940, 0xfffff950,

  0xfffff95f, 0xfffff96f, 0xfffff97f, 0xfffff98e, 0xfffff99e,
  0xfffff9ad, 0xfffff9bd, 0xfffff9cc, 0xfffff9dc, 0xfffff9eb,
  0xfffff9fa, 0xfffffa0a, 0xfffffa19, 0xfffffa28, 0xfffffa37,
  0xfffffa46, 0xfffffa56, 0xfffffa65, 0xfffffa74, 0xfffffa83,
  0xfffffa92, 0xfffffaa1, 0xfffffaaf, 0xfffffabe, 0xfffffacd,
  0xfffffadc, 0xfffffaeb, 0xfffffaf9, 0xfffffb08, 0xfffffb17,
  0xfffffb25, 0xfffffb34, 0xfffffb43, 0xfffffb51, 0xfffffb60,
  0xfffffb6e, 0xfffffb7d, 0xfffffb8b, 0xfffffb9a, 0xfffffba8,

  0xfffffbb6, 0xfffffbc5, 0xfffffbd3, 0xfffffbe1, 0xfffffbf0,
  0xfffffbfe, 0xfffffc0c, 0xfffffc1a, 0xfffffc29, 0xfffffc37,
  0xfffffc45, 0xfffffc53, 0xfffffc61, 0xfffffc6f, 0xfffffc7d,
  0xfffffc8b, 0xfffffc99, 0xfffffca7, 0xfffffcb5, 0xfffffcc3,
  0xfffffcd1, 0xfffffcdf, 0xfffffced, 0xfffffcfb, 0xfffffd09,
  0xfffffd17, 0xfffffd25, 0xfffffd32, 0xfffffd40, 0xfffffd4e,
  0xfffffd5c, 0xfffffd6a, 0xfffffd77, 0xfffffd85, 0xfffffd93,
  0xfffffda0, 0xfffffdae, 0xfffffdbc, 0xfffffdc9, 0xfffffdd7,

  0xfffffde5, 0xfffffdf2, 0xfffffe00, 0xfffffe0e, 0xfffffe1b,
  0xfffffe29, 0xfffffe36, 0xfffffe44, 0xfffffe51, 0xfffffe5f,
  0xfffffe6d, 0xfffffe7a, 0xfffffe88, 0xfffffe95, 0xfffffea3,
  0xfffffeb0, 0xfffffebe, 0xfffffecb, 0xfffffed9, 0xfffffee6,
  0xfffffef4, 0xffffff01, 0xffffff0e, 0xffffff1c, 0xffffff29,
  0xffffff37, 0xffffff44, 0xffffff52, 0xffffff5f, 0xffffff6c,
  0xffffff7a, 0xffffff87, 0xffffff95, 0xffffffa2, 0xffffffb0,
  0xffffffbd, 0xffffffca, 0xffffffd8, 0xffffffe5, 0xfffffff3,

  0x00000000, 0x0000000d, 0x0000001b, 0x00000028, 0x00000036,
  0x00000043, 0x00000050, 0x0000005e, 0x0000006b, 0x00000079,
  0x00000086, 0x00000094, 0x000000a1, 0x000000ae, 0x000000bc,
  0x000000c9, 0x000000d7, 0x000000e4, 0x000000f2, 0x000000ff,
  0x0000010c, 0x0000011a, 0x00000127, 0x00000135, 0x00000142,
  0x00000150, 0x0000015d, 0x0000016b, 0x00000178, 0x00000186,
  0x00000193, 0x000001a1, 0x000001af, 0x000001bc, 0x000001ca,
  0x000001d7, 0x000001e5, 0x000001f2, 0x00000200, 0x0000020e,

  0x0000021b, 0x00000229, 0x00000237, 0x00000244, 0x00000252,
  0x00000260, 0x0000026d, 0x0000027b, 0x00000289, 0x00000296,
  0x000002a4, 0x000002b2, 0x000002c0, 0x000002ce, 0x000002db,
  0x000002e9, 0x000002f7, 0x00000305, 0x00000313, 0x00000321,
  0x0000032f, 0x0000033d, 0x0000034b, 0x00000359, 0x00000367,
  0x00000375, 0x00000383, 0x00000391, 0x0000039f, 0x000003ad,
  0x000003bb, 0x000003c9, 0x000003d7, 0x000003e6, 0x000003f4,
  0x00000402, 0x00000410, 0x0000041f, 0x0000042d, 0x0000043b,

  0x0000044a, 0x00000458, 0x00000466, 0x00000475, 0x00000483,
  0x00000492, 0x000004a0, 0x000004af, 0x000004bd, 0x000004cc,
  0x000004db, 0x000004e9, 0x000004f8, 0x00000507, 0x00000515,
  0x00000524, 0x00000533, 0x00000542, 0x00000551, 0x0000055f,
  0x0000056e, 0x0000057d, 0x0000058c, 0x0000059b, 0x000005aa,
  0x000005ba, 0x000005c9, 0x000005d8, 0x000005e7, 0x000005f6,
  0x00000606, 0x00000615, 0x00000624, 0x00000634, 0x00000643,
  0x00000653, 0x00000662, 0x00000672, 0x00000681, 0x00000691,

  0x000006a1, 0x000006b0, 0x000006c0, 0x000006d0, 0x000006e0,
  0x000006f0, 0x00000700, 0x00000710, 0x00000720, 0x00000730,
  0x00000740, 0x00000750, 0x00000760, 0x00000771, 0x00000781,
  0x00000791, 0x000007a2, 0x000007b2, 0x000007c3, 0x000007d3,
  0x000007e4, 0x000007f5, 0x00000805, 0x00000816, 0x00000827,
  0x00000838, 0x00000849, 0x0000085a, 0x0000086b, 0x0000087c,
  0x0000088d, 0x0000089f, 0x000008b0, 0x000008c1, 0x000008d3,
  0x000008e4, 0x000008f6, 0x00000908, 0x00000919, 0x0000092b,

  0x0000093d, 0x0000094f, 0x00000961, 0x00000973, 0x00000985,
  0x00000997, 0x000009a9, 0x000009bc, 0x000009ce, 0x000009e1,
  0x000009f3, 0x00000a06, 0x00000a18, 0x00000a2b, 0x00000a3e,
  0x00000a51, 0x00000a64, 0x00000a77, 0x00000a8a, 0x00000a9e,
  0x00000ab1, 0x00000ac4, 0x00000ad8, 0x00000aeb, 0x00000aff,
  0x00000b13, 0x00000b27, 0x00000b3b, 0x00000b4f, 0x00000b63,
  0x00000b77, 0x00000b8b, 0x00000ba0, 0x00000bb4, 0x00000bc9,
  0x00000bde, 0x00000bf3, 0x00000c08, 0x00000c1d, 0x00000c32,

  0x00000c47, 0x00000c5c, 0x00000c72, 0x00000c87, 0x00000c9d,
  0x00000cb3, 0x00000cc9, 0x00000cdf, 0x00000cf5, 0x00000d0b,
  0x00000d21, 0x00000d38, 0x00000d4f, 0x00000d65, 0x00000d7c,
  0x00000d93, 0x00000daa, 0x00000dc2, 0x00000dd9, 0x00000df0,
  0x00000e08, 0x00000e20, 0x00000e38, 0x00000e50, 0x00000e68,
  0x00000e80, 0x00000e99, 0x00000eb2, 0x00000eca, 0x00000ee3,
  0x00000efc, 0x00000f16, 0x00000f2f, 0x00000f49, 0x00000f62,
  0x00000f7c, 0x00000f96, 0x00000fb0, 0x00000fcb, 0x00000fe5,

  0x00001000, 0x0000101b, 0x00001036, 0x00001051, 0x0000106d,
  0x00001088, 0x000010a4, 0x000010c0, 0x000010dc, 0x000010f9,
  0x00001115, 0x00001132, 0x0000114f, 0x0000116c, 0x0000118a,
  0x000011a7, 0x000011c5, 0x000011e3, 0x00001201, 0x00001220,
  0x0000123f, 0x0000125e, 0x0000127d, 0x0000129c, 0x000012bc,
  0x000012dc, 0x000012fc, 0x0000131c, 0x0000133d, 0x0000135e,
  0x0000137f, 0x000013a0, 0x000013c2, 0x000013e4, 0x00001406,
  0x00001429, 0x0000144c, 0x0000146f, 0x00001492, 0x000014b6,

  0x000014da, 0x000014fe, 0x00001523, 0x00001548, 0x0000156d,
  0x00001593, 0x000015b9, 0x000015df, 0x00001606, 0x0000162d,
  0x00001654, 0x0000167c, 0x000016a4, 0x000016cc, 0x000016f5,
  0x0000171e, 0x00001748, 0x00001772, 0x0000179c, 0x000017c7,
  0x000017f2, 0x0000181e, 0x0000184a, 0x00001876, 0x000018a3,
  0x000018d1, 0x000018ff, 0x0000192d, 0x0000195c, 0x0000198b,
  0x000019bb, 0x000019eb, 0x00001a1c, 0x00001a4d, 0x00001a7f,
  0x00001ab2, 0x00001ae5, 0x00001b18, 0x00001b4c, 0x00001b81,

  0x00001bb6, 0x00001bec, 0x00001c23, 0x00001c5a, 0x00001c92,
  0x00001cca, 0x00001d04, 0x00001d3d, 0x00001d78, 0x00001db3,
  0x00001def, 0x00001e2c, 0x00001e69, 0x00001ea7, 0x00001ee6,
  0x00001f26, 0x00001f67, 0x00001fa8, 0x00001feb, 0x0000202e,
  0x00002072, 0x000020b7, 0x000020fd, 0x00002144, 0x0000218b,
  0x000021d4, 0x0000221e, 0x00002269, 0x000022b5, 0x00002302,
  0x00002350, 0x0000239f, 0x000023f0, 0x00002441, 0x00002494,
  0x000024e8, 0x0000253e, 0x00002594, 0x000025ec, 0x00002646,

  0x000026a1, 0x000026fd, 0x0000275b, 0x000027ba, 0x0000281b,
  0x0000287d, 0x000028e1, 0x00002947, 0x000029ae, 0x00002a18,
  0x00002a83, 0x00002af0, 0x00002b5f, 0x00002bd0, 0x00002c43,
  0x00002cb8, 0x00002d2f, 0x00002da8, 0x00002e24, 0x00002ea2,
  0x00002f22, 0x00002fa5, 0x0000302b, 0x000030b3, 0x0000313e,
  0x000031cc, 0x0000325d, 0x000032f0, 0x00003387, 0x00003421,
  0x000034bf, 0x0000355f, 0x00003604, 0x000036ac, 0x00003758,
  0x00003807, 0x000038bb, 0x00003973, 0x00003a30, 0x00003af1,

  0x00003bb6, 0x00003c81, 0x00003d51, 0x00003e26, 0x00003f00,
  0x00003fe0, 0x000040c6, 0x000041b2, 0x000042a5, 0x0000439e,
  0x0000449f, 0x000045a6, 0x000046b6, 0x000047cd, 0x000048ec,
  0x00004a15, 0x00004b46, 0x00004c81, 0x00004dc6, 0x00004f15,
  0x00005070, 0x000051d6, 0x00005348, 0x000054c7, 0x00005654,
  0x000057ef, 0x00005999, 0x00005b53, 0x00005d1d, 0x00005efa,
  0x000060e9, 0x000062ec, 0x00006505, 0x00006734, 0x0000697c,
  0x00006bdd, 0x00006e5a, 0x000070f4, 0x000073ad, 0x00007688,

  0x00007988, 0x00007caf, 0x00008000, 0x0000837f, 0x0000872f,
  0x00008b15, 0x00008f35, 0x00009395, 0x0000983b, 0x00009d2d,
  0x0000a273, 0x0000a816, 0x0000ae20, 0x0000b49c, 0x0000bb98,
  0x0000c322, 0x0000cb4d, 0x0000d42d, 0x0000dddb, 0x0000e874,
  0x0000f41d, 0x000100ff, 0x00010f4f, 0x00011f4e, 0x0001314c,
  0x000145b0, 0x00015cfd, 0x000177de, 0x0001973a, 0x0001bc49,
  0x0001e8c0, 0x00021f18, 0x00026302, 0x0002ba55, 0x00032ec2,
  0x0003d1c0, 0x0004c63a, 0x00065dad, 0x00098c8f, 0x0013192e,

  0x00000000
};

/* This is SIN lookup table.  NOTE:
 * 1. The index ranges in value from 0 to 3*PI/2-1.
 * 2. The value obtain from the table have 12 bits of fraction.
 * 3. COS(x) = SIN(x + HALFPI)
 */

const int16_t g_sin_table[TWOPI + HALFPI + 1] =
{
  0x0000, 0x000d, 0x001b, 0x0028, 0x0036, 0x0043, 0x0050, 0x005e,
  0x006b, 0x0079, 0x0086, 0x0093, 0x00a1, 0x00ae, 0x00bc, 0x00c9,
  0x00d6, 0x00e4, 0x00f1, 0x00ff, 0x010c, 0x0119, 0x0127, 0x0134,
  0x0141, 0x014f, 0x015c, 0x0169, 0x0177, 0x0184, 0x0191, 0x019f,
  0x01ac, 0x01b9, 0x01c7, 0x01d4, 0x01e1, 0x01ef, 0x01fc, 0x0209,
  0x0217, 0x0224, 0x0231, 0x023e, 0x024c, 0x0259, 0x0266, 0x0274,
  0x0281, 0x028e, 0x029b, 0x02a8, 0x02b6, 0x02c3, 0x02d0, 0x02dd,
  0x02ea, 0x02f8, 0x0305, 0x0312, 0x031f, 0x032c, 0x0339, 0x0346,

  0x0354, 0x0361, 0x036e, 0x037b, 0x0388, 0x0395, 0x03a2, 0x03af,
  0x03bc, 0x03c9, 0x03d6, 0x03e3, 0x03f0, 0x03fd, 0x040a, 0x0417,
  0x0424, 0x0431, 0x043e, 0x044b, 0x0458, 0x0465, 0x0472, 0x047e,
  0x048b, 0x0498, 0x04a5, 0x04b2, 0x04bf, 0x04cb, 0x04d8, 0x04e5,
  0x04f2, 0x04fe, 0x050b, 0x0518, 0x0525, 0x0531, 0x053e, 0x054b,
  0x0557, 0x0564, 0x0571, 0x057d, 0x058a, 0x0596, 0x05a3, 0x05af,
  0x05bc, 0x05c8, 0x05d5, 0x05e1, 0x05ee, 0x05fa, 0x0607, 0x0613,
  0x061f, 0x062c, 0x0638, 0x0645, 0x0651, 0x065d, 0x0669, 0x0676,

  0x0682, 0x068e, 0x069a, 0x06a7, 0x06b3, 0x06bf, 0x06cb, 0x06d7,
  0x06e3, 0x06ef, 0x06fc, 0x0708, 0x0714, 0x0720, 0x072c, 0x0738,
  0x0744, 0x074f, 0x075b, 0x0767, 0x0773, 0x077f, 0x078b, 0x0797,
  0x07a2, 0x07ae, 0x07ba, 0x07c6, 0x07d1, 0x07dd, 0x07e9, 0x07f4,
  0x0800, 0x080c, 0x0817, 0x0823, 0x082e, 0x083a, 0x0845, 0x0851,
  0x085c, 0x0868, 0x0873, 0x087e, 0x088a, 0x0895, 0x08a0, 0x08ac,
  0x08b7, 0x08c2, 0x08cd, 0x08d8, 0x08e4, 0x08ef, 0x08fa, 0x0905,
  0x0910, 0x091b, 0x0926, 0x0931, 0x093c, 0x0947, 0x0952, 0x095d,

  0x0968, 0x0972, 0x097d, 0x0988, 0x0993, 0x099d, 0x09a8, 0x09b3,
  0x09bd, 0x09c8, 0x09d3, 0x09dd, 0x09e8, 0x09f2, 0x09fd, 0x0a07,
  0x0a12, 0x0a1c, 0x0a26, 0x0a31, 0x0a3b, 0x0a45, 0x0a50, 0x0a5a,
  0x0a64, 0x0a6e, 0x0a78, 0x0a83, 0x0a8d, 0x0a97, 0x0aa1, 0x0aab,
  0x0ab5, 0x0abf, 0x0ac9, 0x0ad3, 0x0adc, 0x0ae6, 0x0af0, 0x0afa,
  0x0b04, 0x0b0d, 0x0b17, 0x0b21, 0x0b2a, 0x0b34, 0x0b3d, 0x0b47,
  0x0b50, 0x0b5a, 0x0b63, 0x0b6d, 0x0b76, 0x0b7f, 0x0b89, 0x0b92,
  0x0b9b, 0x0ba4, 0x0bae, 0x0bb7, 0x0bc0, 0x0bc9, 0x0bd2, 0x0bdb,

  0x0be4, 0x0bed, 0x0bf6, 0x0bff, 0x0c08, 0x0c10, 0x0c19, 0x0c22,
  0x0c2b, 0x0c33, 0x0c3c, 0x0c45, 0x0c4d, 0x0c56, 0x0c5e, 0x0c67,
  0x0c6f, 0x0c78, 0x0c80, 0x0c88, 0x0c91, 0x0c99, 0x0ca1, 0x0ca9,
  0x0cb2, 0x0cba, 0x0cc2, 0x0cca, 0x0cd2, 0x0cda, 0x0ce2, 0x0cea,
  0x0cf2, 0x0cfa, 0x0d01, 0x0d09, 0x0d11, 0x0d19, 0x0d20, 0x0d28,
  0x0d30, 0x0d37, 0x0d3f, 0x0d46, 0x0d4e, 0x0d55, 0x0d5d, 0x0d64,
  0x0d6b, 0x0d72, 0x0d7a, 0x0d81, 0x0d88, 0x0d8f, 0x0d96, 0x0d9d,
  0x0da4, 0x0dab, 0x0db2, 0x0db9, 0x0dc0, 0x0dc7, 0x0dce, 0x0dd5,

  0x0ddb, 0x0de2, 0x0de9, 0x0def, 0x0df6, 0x0dfc, 0x0e03, 0x0e09,
  0x0e10, 0x0e16, 0x0e1c, 0x0e23, 0x0e29, 0x0e2f, 0x0e35, 0x0e3b,
  0x0e42, 0x0e48, 0x0e4e, 0x0e54, 0x0e5a, 0x0e5f, 0x0e65, 0x0e6b,
  0x0e71, 0x0e77, 0x0e7c, 0x0e82, 0x0e88, 0x0e8d, 0x0e93, 0x0e98,
  0x0e9e, 0x0ea3, 0x0ea9, 0x0eae, 0x0eb3, 0x0eb9, 0x0ebe, 0x0ec3,
  0x0ec8, 0x0ecd, 0x0ed2, 0x0ed7, 0x0edc, 0x0ee1, 0x0ee6, 0x0eeb,
  0x0ef0, 0x0ef5, 0x0ef9, 0x0efe, 0x0f03, 0x0f07, 0x0f0c, 0x0f11,
  0x0f15, 0x0f1a, 0x0f1e, 0x0f22, 0x0f27, 0x0f2b, 0x0f2f, 0x0f33,

  0x0f38, 0x0f3c, 0x0f40, 0x0f44, 0x0f48, 0x0f4c, 0x0f50, 0x0f53,
  0x0f57, 0x0f5b, 0x0f5f, 0x0f63, 0x0f66, 0x0f6a, 0x0f6d, 0x0f71,
  0x0f74, 0x0f78, 0x0f7b, 0x0f7f, 0x0f82, 0x0f85, 0x0f88, 0x0f8c,
  0x0f8f, 0x0f92, 0x0f95, 0x0f98, 0x0f9b, 0x0f9e, 0x0fa1, 0x0fa4,
  0x0fa6, 0x0fa9, 0x0fac, 0x0faf, 0x0fb1, 0x0fb4, 0x0fb6, 0x0fb9,
  0x0fbb, 0x0fbe, 0x0fc0, 0x0fc3, 0x0fc5, 0x0fc7, 0x0fc9, 0x0fcb,
  0x0fce, 0x0fd0, 0x0fd2, 0x0fd4, 0x0fd6, 0x0fd8, 0x0fd9, 0x0fdb,
  0x0fdd, 0x0fdf, 0x0fe0, 0x0fe2, 0x0fe4, 0x0fe5, 0x0fe7, 0x0fe8,

  0x0fea, 0x0feb, 0x0fec, 0x0fee, 0x0fef, 0x0ff0, 0x0ff1, 0x0ff2,
  0x0ff3, 0x0ff4, 0x0ff5, 0x0ff6, 0x0ff7, 0x0ff8, 0x0ff9, 0x0ffa,
  0x0ffa, 0x0ffb, 0x0ffc, 0x0ffc, 0x0ffd, 0x0ffd, 0x0ffe, 0x0ffe,
  0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x1000, 0x1000, 0x1000, 0x1000,
  0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0fff, 0x0fff, 0x0fff,
  0x0fff, 0x0ffe, 0x0ffe, 0x0ffd, 0x0ffd, 0x0ffc, 0x0ffc, 0x0ffb,
  0x0ffa, 0x0ffa, 0x0ff9, 0x0ff8, 0x0ff7, 0x0ff6, 0x0ff5, 0x0ff4,
  0x0ff3, 0x0ff2, 0x0ff1, 0x0ff0, 0x0fef, 0x0fee, 0x0fec, 0x0feb,

  0x0fea, 0x0fe8, 0x0fe7, 0x0fe5, 0x0fe4, 0x0fe2, 0x0fe0, 0x0fdf,
  0x0fdd, 0x0fdb, 0x0fd9, 0x0fd8, 0x0fd6, 0x0fd4, 0x0fd2, 0x0fd0,
  0x0fce, 0x0fcb, 0x0fc9, 0x0fc7, 0x0fc5, 0x0fc3, 0x0fc0, 0x0fbe,
  0x0fbb, 0x0fb9, 0x0fb6, 0x0fb4, 0x0fb1, 0x0faf, 0x0fac, 0x0fa9,
  0x0fa6, 0x0fa4, 0x0fa1, 0x0f9e, 0x0f9b, 0x0f98, 0x0f95, 0x0f92,
  0x0f8f, 0x0f8c, 0x0f88, 0x0f85, 0x0f82, 0x0f7f, 0x0f7b, 0x0f78,
  0x0f74, 0x0f71, 0x0f6d, 0x0f6a, 0x0f66, 0x0f63, 0x0f5f, 0x0f5b,
  0x0f57, 0x0f53, 0x0f50, 0x0f4c, 0x0f48, 0x0f44, 0x0f40, 0x0f3c,

  0x0f38, 0x0f33, 0x0f2f, 0x0f2b, 0x0f27, 0x0f22, 0x0f1e, 0x0f1a,
  0x0f15, 0x0f11, 0x0f0c, 0x0f07, 0x0f03, 0x0efe, 0x0ef9, 0x0ef5,
  0x0ef0, 0x0eeb, 0x0ee6, 0x0ee1, 0x0edc, 0x0ed7, 0x0ed2, 0x0ecd,
  0x0ec8, 0x0ec3, 0x0ebe, 0x0eb9, 0x0eb3, 0x0eae, 0x0ea9, 0x0ea3,
  0x0e9e, 0x0e98, 0x0e93, 0x0e8d, 0x0e88, 0x0e82, 0x0e7c, 0x0e77,
  0x0e71, 0x0e6b, 0x0e65, 0x0e5f, 0x0e5a, 0x0e54, 0x0e4e, 0x0e48,
  0x0e42, 0x0e3b, 0x0e35, 0x0e2f, 0x0e29, 0x0e23, 0x0e1c, 0x0e16,
  0x0e10, 0x0e09, 0x0e03, 0x0dfc, 0x0df6, 0x0def, 0x0de9, 0x0de2,

  0x0ddb, 0x0dd5, 0x0dce, 0x0dc7, 0x0dc0, 0x0db9, 0x0db2, 0x0dab,
  0x0da4, 0x0d9d, 0x0d96, 0x0d8f, 0x0d88, 0x0d81, 0x0d7a, 0x0d72,
  0x0d6b, 0x0d64, 0x0d5d, 0x0d55, 0x0d4e, 0x0d46, 0x0d3f, 0x0d37,
  0x0d30, 0x0d28, 0x0d20, 0x0d19, 0x0d11, 0x0d09, 0x0d01, 0x0cfa,
  0x0cf2, 0x0cea, 0x0ce2, 0x0cda, 0x0cd2, 0x0cca, 0x0cc2, 0x0cba,
  0x0cb2, 0x0ca9, 0x0ca1, 0x0c99, 0x0c91, 0x0c88, 0x0c80, 0x0c78,
  0x0c6f, 0x0c67, 0x0c5e, 0x0c56, 0x0c4d, 0x0c45, 0x0c3c, 0x0c33,
  0x0c2b, 0x0c22, 0x0c19, 0x0c10, 0x0c08, 0x0bff, 0x0bf6, 0x0bed,

  0x0be4, 0x0bdb, 0x0bd2, 0x0bc9, 0x0bc0, 0x0bb7, 0x0bae, 0x0ba4,
  0x0b9b, 0x0b92, 0x0b89, 0x0b7f, 0x0b76, 0x0b6d, 0x0b63, 0x0b5a,
  0x0b50, 0x0b47, 0x0b3d, 0x0b34, 0x0b2a, 0x0b21, 0x0b17, 0x0b0d,
  0x0b04, 0x0afa, 0x0af0, 0x0ae6, 0x0adc, 0x0ad3, 0x0ac9, 0x0abf,
  0x0ab5, 0x0aab, 0x0aa1, 0x0a97, 0x0a8d, 0x0a83, 0x0a78, 0x0a6e,
  0x0a64, 0x0a5a, 0x0a50, 0x0a45, 0x0a3b, 0x0a31, 0x0a26, 0x0a1c,
  0x0a12, 0x0a07, 0x09fd, 0x09f2, 0x09e8, 0x09dd, 0x09d3, 0x09c8,
  0x09bd, 0x09b3, 0x09a8, 0x099d, 0x0993, 0x0988, 0x097d, 0x0972,

  0x0968, 0x095d, 0x0952, 0x0947, 0x093c, 0x0931, 0x0926, 0x091b,
  0x0910, 0x0905, 0x08fa, 0x08ef, 0x08e4, 0x08d8, 0x08cd, 0x08c2,
  0x08b7, 0x08ac, 0x08a0, 0x0895, 0x088a, 0x087e, 0x0873, 0x0868,
  0x085c, 0x0851, 0x0845, 0x083a, 0x082e, 0x0823, 0x0817, 0x080c,
  0x0800, 0x07f4, 0x07e9, 0x07dd, 0x07d1, 0x07c6, 0x07ba, 0x07ae,
  0x07a2, 0x0797, 0x078b, 0x077f, 0x0773, 0x0767, 0x075b, 0x074f,
  0x0744, 0x0738, 0x072c, 0x0720, 0x0714, 0x0708, 0x06fc, 0x06ef,
  0x06e3, 0x06d7, 0x06cb, 0x06bf, 0x06b3, 0x06a7, 0x069a, 0x068e,

  0x0682, 0x0676, 0x0669, 0x065d, 0x0651, 0x0645, 0x0638, 0x062c,
  0x061f, 0x0613, 0x0607, 0x05fa, 0x05ee, 0x05e1, 0x05d5, 0x05c8,
  0x05bc, 0x05af, 0x05a3, 0x0596, 0x058a, 0x057d, 0x0571, 0x0564,
  0x0557, 0x054b, 0x053e, 0x0531, 0x0525, 0x0518, 0x050b, 0x04fe,
  0x04f2, 0x04e5, 0x04d8, 0x04cb, 0x04bf, 0x04b2, 0x04a5, 0x0498,
  0x048b, 0x047e, 0x0472, 0x0465, 0x0458, 0x044b, 0x043e, 0x0431,
  0x0424, 0x0417, 0x040a, 0x03fd, 0x03f0, 0x03e3, 0x03d6, 0x03c9,
  0x03bc, 0x03af, 0x03a2, 0x0395, 0x0388, 0x037b, 0x036e, 0x0361,

  0x0354, 0x0346, 0x0339, 0x032c, 0x031f, 0x0312, 0x0305, 0x02f8,
  0x02ea, 0x02dd, 0x02d0, 0x02c3, 0x02b6, 0x02a8, 0x029b, 0x028e,
  0x0281, 0x0274, 0x0266, 0x0259, 0x024c, 0x023e, 0x0231, 0x0224,
  0x0217, 0x0209, 0x01fc, 0x01ef, 0x01e1, 0x01d4, 0x01c7, 0x01b9,
  0x01ac, 0x019f, 0x0191, 0x0184, 0x0177, 0x0169, 0x015c, 0x014f,
  0x0141, 0x0134, 0x0127, 0x0119, 0x010c, 0x00ff, 0x00f1, 0x00e4,
  0x00d6, 0x00c9, 0x00bc, 0x00ae, 0x00a1, 0x0093, 0x0086, 0x0079,
  0x006b, 0x005e, 0x0050, 0x0043, 0x0036, 0x0028, 0x001b, 0x000d,

  0x0000, 0xfff3, 0xffe5, 0xffd8, 0xffca, 0xffbd, 0xffb0, 0xffa2,
  0xff95, 0xff87, 0xff7a, 0xff6d, 0xff5f, 0xff52, 0xff44, 0xff37,
  0xff2a, 0xff1c, 0xff0f, 0xff01, 0xfef4, 0xfee7, 0xfed9, 0xfecc,
  0xfebf, 0xfeb1, 0xfea4, 0xfe97, 0xfe89, 0xfe7c, 0xfe6f, 0xfe61,
  0xfe54, 0xfe47, 0xfe39, 0xfe2c, 0xfe1f, 0xfe11, 0xfe04, 0xfdf7,
  0xfde9, 0xfddc, 0xfdcf, 0xfdc2, 0xfdb4, 0xfda7, 0xfd9a, 0xfd8c,
  0xfd7f, 0xfd72, 0xfd65, 0xfd58, 0xfd4a, 0xfd3d, 0xfd30, 0xfd23,
  0xfd16, 0xfd08, 0xfcfb, 0xfcee, 0xfce1, 0xfcd4, 0xfcc7, 0xfcba,

  0xfcac, 0xfc9f, 0xfc92, 0xfc85, 0xfc78, 0xfc6b, 0xfc5e, 0xfc51,
  0xfc44, 0xfc37, 0xfc2a, 0xfc1d, 0xfc10, 0xfc03, 0xfbf6, 0xfbe9,
  0xfbdc, 0xfbcf, 0xfbc2, 0xfbb5, 0xfba8, 0xfb9b, 0xfb8e, 0xfb82,
  0xfb75, 0xfb68, 0xfb5b, 0xfb4e, 0xfb41, 0xfb35, 0xfb28, 0xfb1b,
  0xfb0e, 0xfb02, 0xfaf5, 0xfae8, 0xfadb, 0xfacf, 0xfac2, 0xfab5,
  0xfaa9, 0xfa9c, 0xfa8f, 0xfa83, 0xfa76, 0xfa6a, 0xfa5d, 0xfa51,
  0xfa44, 0xfa38, 0xfa2b, 0xfa1f, 0xfa12, 0xfa06, 0xf9f9, 0xf9ed,
  0xf9e1, 0xf9d4, 0xf9c8, 0xf9bb, 0xf9af, 0xf9a3, 0xf997, 0xf98a,

  0xf97e, 0xf972, 0xf966, 0xf959, 0xf94d, 0xf941, 0xf935, 0xf929,
  0xf91d, 0xf911, 0xf904, 0xf8f8, 0xf8ec, 0xf8e0, 0xf8d4, 0xf8c8,
  0xf8bc, 0xf8b1, 0xf8a5, 0xf899, 0xf88d, 0xf881, 0xf875, 0xf869,
  0xf85e, 0xf852, 0xf846, 0xf83a, 0xf82f, 0xf823, 0xf817, 0xf80c,
  0xf800, 0xf7f4, 0xf7e9, 0xf7dd, 0xf7d2, 0xf7c6, 0xf7bb, 0xf7af,
  0xf7a4, 0xf798, 0xf78d, 0xf782, 0xf776, 0xf76b, 0xf760, 0xf754,
  0xf749, 0xf73e, 0xf733, 0xf728, 0xf71c, 0xf711, 0xf706, 0xf6fb,
  0xf6f0, 0xf6e5, 0xf6da, 0xf6cf, 0xf6c4, 0xf6b9, 0xf6ae, 0xf6a3,

  0xf698, 0xf68e, 0xf683, 0xf678, 0xf66d, 0xf663, 0xf658, 0xf64d,
  0xf643, 0xf638, 0xf62d, 0xf623, 0xf618, 0xf60e, 0xf603, 0xf5f9,
  0xf5ee, 0xf5e4, 0xf5da, 0xf5cf, 0xf5c5, 0xf5bb, 0xf5b0, 0xf5a6,
  0xf59c, 0xf592, 0xf588, 0xf57d, 0xf573, 0xf569, 0xf55f, 0xf555,
  0xf54b, 0xf541, 0xf537, 0xf52d, 0xf524, 0xf51a, 0xf510, 0xf506,
  0xf4fd, 0xf4f3, 0xf4e9, 0xf4df, 0xf4d6, 0xf4cc, 0xf4c3, 0xf4b9,
  0xf4b0, 0xf4a6, 0xf49d, 0xf493, 0xf48a, 0xf481, 0xf477, 0xf46e,
  0xf465, 0xf45c, 0xf452, 0xf449, 0xf440, 0xf437, 0xf42e, 0xf425,

  0xf41c, 0xf413, 0xf40a, 0xf401, 0xf3f8, 0xf3f0, 0xf3e7, 0xf3de,
  0xf3d5, 0xf3cd, 0xf3c4, 0xf3bb, 0xf3b3, 0xf3aa, 0xf3a2, 0xf399,
  0xf391, 0xf388, 0xf380, 0xf378, 0xf36f, 0xf367, 0xf35f, 0xf357,
  0xf34e, 0xf346, 0xf33e, 0xf336, 0xf32e, 0xf326, 0xf31e, 0xf316,
  0xf30e, 0xf306, 0xf2ff, 0xf2f7, 0xf2ef, 0xf2e7, 0xf2e0, 0xf2d8,
  0xf2d0, 0xf2c9, 0xf2c1, 0xf2ba, 0xf2b2, 0xf2ab, 0xf2a3, 0xf29c,
  0xf295, 0xf28e, 0xf286, 0xf27f, 0xf278, 0xf271, 0xf26a, 0xf263,
  0xf25c, 0xf255, 0xf24e, 0xf247, 0xf240, 0xf239, 0xf232, 0xf22b,

  0xf225, 0xf21e, 0xf217, 0xf211, 0xf20a, 0xf204, 0xf1fd, 0xf1f7,
  0xf1f0, 0xf1ea, 0xf1e4, 0xf1dd, 0xf1d7, 0xf1d1, 0xf1cb, 0xf1c5,
  0xf1be, 0xf1b8, 0xf1b2, 0xf1ac, 0xf1a6, 0xf1a1, 0xf19b, 0xf195,
  0xf18f, 0xf189, 0xf184, 0xf17e, 0xf178, 0xf173, 0xf16d, 0xf168,
  0xf162, 0xf15d, 0xf157, 0xf152, 0xf14d, 0xf147, 0xf142, 0xf13d,
  0xf138, 0xf133, 0xf12e, 0xf129, 0xf124, 0xf11f, 0xf11a, 0xf115,
  0xf110, 0xf10b, 0xf107, 0xf102, 0xf0fd, 0xf0f9, 0xf0f4, 0xf0ef,
  0xf0eb, 0xf0e6, 0xf0e2, 0xf0de, 0xf0d9, 0xf0d5, 0xf0d1, 0xf0cd,

  0xf0c8, 0xf0c4, 0xf0c0, 0xf0bc, 0xf0b8, 0xf0b4, 0xf0b0, 0xf0ad,
  0xf0a9, 0xf0a5, 0xf0a1, 0xf09d, 0xf09a, 0xf096, 0xf093, 0xf08f,
  0xf08c, 0xf088, 0xf085, 0xf081, 0xf07e, 0xf07b, 0xf078, 0xf074,
  0xf071, 0xf06e, 0xf06b, 0xf068, 0xf065, 0xf062, 0xf05f, 0xf05c,
  0xf05a, 0xf057, 0xf054, 0xf051, 0xf04f, 0xf04c, 0xf04a, 0xf047,
  0xf045, 0xf042, 0xf040, 0xf03d, 0xf03b, 0xf039, 0xf037, 0xf035,
  0xf032, 0xf030, 0xf02e, 0xf02c, 0xf02a, 0xf028, 0xf027, 0xf025,
  0xf023, 0xf021, 0xf020, 0xf01e, 0xf01c, 0xf01b, 0xf019, 0xf018,

  0xf016, 0xf015, 0xf014, 0xf012, 0xf011, 0xf010, 0xf00f, 0xf00e,
  0xf00d, 0xf00c, 0xf00b, 0xf00a, 0xf009, 0xf008, 0xf007, 0xf006,
  0xf006, 0xf005, 0xf004, 0xf004, 0xf003, 0xf003, 0xf002, 0xf002,
  0xf001, 0xf001, 0xf001, 0xf001, 0xf000, 0xf000, 0xf000, 0xf000,
  0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf001, 0xf001, 0xf001,
  0xf001, 0xf002, 0xf002, 0xf003, 0xf003, 0xf004, 0xf004, 0xf005,
  0xf006, 0xf006, 0xf007, 0xf008, 0xf009, 0xf00a, 0xf00b, 0xf00c,
  0xf00d, 0xf00e, 0xf00f, 0xf010, 0xf011, 0xf012, 0xf014, 0xf015,

  0xf016, 0xf018, 0xf019, 0xf01b, 0xf01c, 0xf01e, 0xf020, 0xf021,
  0xf023, 0xf025, 0xf027, 0xf028, 0xf02a, 0xf02c, 0xf02e, 0xf030,
  0xf032, 0xf035, 0xf037, 0xf039, 0xf03b, 0xf03d, 0xf040, 0xf042,
  0xf045, 0xf047, 0xf04a, 0xf04c, 0xf04f, 0xf051, 0xf054, 0xf057,
  0xf05a, 0xf05c, 0xf05f, 0xf062, 0xf065, 0xf068, 0xf06b, 0xf06e,
  0xf071, 0xf074, 0xf078, 0xf07b, 0xf07e, 0xf081, 0xf085, 0xf088,
  0xf08c, 0xf08f, 0xf093, 0xf096, 0xf09a, 0xf09d, 0xf0a1, 0xf0a5,
  0xf0a9, 0xf0ad, 0xf0b0, 0xf0b4, 0xf0b8, 0xf0bc, 0xf0c0, 0xf0c4,

  0xf0c8, 0xf0cd, 0xf0d1, 0xf0d5, 0xf0d9, 0xf0de, 0xf0e2, 0xf0e6,
  0xf0eb, 0xf0ef, 0xf0f4, 0xf0f9, 0xf0fd, 0xf102, 0xf107, 0xf10b,
  0xf110, 0xf115, 0xf11a, 0xf11f, 0xf124, 0xf129, 0xf12e, 0xf133,
  0xf138, 0xf13d, 0xf142, 0xf147, 0xf14d, 0xf152, 0xf157, 0xf15d,
  0xf162, 0xf168, 0xf16d, 0xf173, 0xf178, 0xf17e, 0xf184, 0xf189,
  0xf18f, 0xf195, 0xf19b, 0xf1a1, 0xf1a6, 0xf1ac, 0xf1b2, 0xf1b8,
  0xf1be, 0xf1c5, 0xf1cb, 0xf1d1, 0xf1d7, 0xf1dd, 0xf1e4, 0xf1ea,
  0xf1f0, 0xf1f7, 0xf1fd, 0xf204, 0xf20a, 0xf211, 0xf217, 0xf21e,

  0xf225, 0xf22b, 0xf232, 0xf239, 0xf240, 0xf247, 0xf24e, 0xf255,
  0xf25c, 0xf263, 0xf26a, 0xf271, 0xf278, 0xf27f, 0xf286, 0xf28e,
  0xf295, 0xf29c, 0xf2a3, 0xf2ab, 0xf2b2, 0xf2ba, 0xf2c1, 0xf2c9,
  0xf2d0, 0xf2d8, 0xf2e0, 0xf2e7, 0xf2ef, 0xf2f7, 0xf2ff, 0xf306,
  0xf30e, 0xf316, 0xf31e, 0xf326, 0xf32e, 0xf336, 0xf33e, 0xf346,
  0xf34e, 0xf357, 0xf35f, 0xf367, 0xf36f, 0xf378, 0xf380, 0xf388,
  0xf391, 0xf399, 0xf3a2, 0xf3aa, 0xf3b3, 0xf3bb, 0xf3c4, 0xf3cd,
  0xf3d5, 0xf3de, 0xf3e7, 0xf3f0, 0xf3f8, 0xf401, 0xf40a, 0xf413,

  0xf41c, 0xf425, 0xf42e, 0xf437, 0xf440, 0xf449, 0xf452, 0xf45c,
  0xf465, 0xf46e, 0xf477, 0xf481, 0xf48a, 0xf493, 0xf49d, 0xf4a6,
  0xf4b0, 0xf4b9, 0xf4c3, 0xf4cc, 0xf4d6, 0xf4df, 0xf4e9, 0xf4f3,
  0xf4fc, 0xf506, 0xf510, 0xf51a, 0xf524, 0xf52d, 0xf537, 0xf541,
  0xf54b, 0xf555, 0xf55f, 0xf569, 0xf573, 0xf57d, 0xf588, 0xf592,
  0xf59c, 0xf5a6, 0xf5b0, 0xf5bb, 0xf5c5, 0xf5cf, 0xf5da, 0xf5e4,
  0xf5ee, 0xf5f9, 0xf603, 0xf60e, 0xf618, 0xf623, 0xf62d, 0xf638,
  0xf643, 0xf64d, 0xf658, 0xf663, 0xf66d, 0xf678, 0xf683, 0xf68e,

  0xf698, 0xf6a3, 0xf6ae, 0xf6b9, 0xf6c4, 0xf6cf, 0xf6da, 0xf6e5,
  0xf6f0, 0xf6fb, 0xf706, 0xf711, 0xf71c, 0xf728, 0xf733, 0xf73e,
  0xf749, 0xf754, 0xf760, 0xf76b, 0xf776, 0xf782, 0xf78d, 0xf798,
  0xf7a4, 0xf7af, 0xf7bb, 0xf7c6, 0xf7d2, 0xf7dd, 0xf7e9, 0xf7f4,
  0xf800, 0xf80c, 0xf817, 0xf823, 0xf82f, 0xf83a, 0xf846, 0xf852,
  0xf85e, 0xf869, 0xf875, 0xf881, 0xf88d, 0xf899, 0xf8a5, 0xf8b1,
  0xf8bc, 0xf8c8, 0xf8d4, 0xf8e0, 0xf8ec, 0xf8f8, 0xf904, 0xf911,
  0xf91d, 0xf929, 0xf935, 0xf941, 0xf94d, 0xf959, 0xf966, 0xf972,

  0xf97e, 0xf98a, 0xf997, 0xf9a3, 0xf9af, 0xf9bb, 0xf9c8, 0xf9d4,
  0xf9e1, 0xf9ed, 0xf9f9, 0xfa06, 0xfa12, 0xfa1f, 0xfa2b, 0xfa38,
  0xfa44, 0xfa51, 0xfa5d, 0xfa6a, 0xfa76, 0xfa83, 0xfa8f, 0xfa9c,
  0xfaa9, 0xfab5, 0xfac2, 0xfacf, 0xfadb, 0xfae8, 0xfaf5, 0xfb02,
  0xfb0e, 0xfb1b, 0xfb28, 0xfb35, 0xfb41, 0xfb4e, 0xfb5b, 0xfb68,
  0xfb75, 0xfb82, 0xfb8e, 0xfb9b, 0xfba8, 0xfbb5, 0xfbc2, 0xfbcf,
  0xfbdc, 0xfbe9, 0xfbf6, 0xfc03, 0xfc10, 0xfc1d, 0xfc2a, 0xfc37,
  0xfc44, 0xfc51, 0xfc5e, 0xfc6b, 0xfc78, 0xfc85, 0xfc92, 0xfc9f,

  0xfcac, 0xfcba, 0xfcc7, 0xfcd4, 0xfce1, 0xfcee, 0xfcfb, 0xfd08,
  0xfd16, 0xfd23, 0xfd30, 0xfd3d, 0xfd4a, 0xfd58, 0xfd65, 0xfd72,
  0xfd7f, 0xfd8c, 0xfd9a, 0xfda7, 0xfdb4, 0xfdc2, 0xfdcf, 0xfddc,
  0xfde9, 0xfdf7, 0xfe04, 0xfe11, 0xfe1f, 0xfe2c, 0xfe39, 0xfe47,
  0xfe54, 0xfe61, 0xfe6f, 0xfe7c, 0xfe89, 0xfe97, 0xfea4, 0xfeb1,
  0xfebf, 0xfecc, 0xfed9, 0xfee7, 0xfef4, 0xff01, 0xff0f, 0xff1c,
  0xff2a, 0xff37, 0xff44, 0xff52, 0xff5f, 0xff6d, 0xff7a, 0xff87,
  0xff95, 0xffa2, 0xffb0, 0xffbd, 0xffca, 0xffd8, 0xffe5, 0xfff3,

  0x0000, 0x000d, 0x001b, 0x0028, 0x0036, 0x0043, 0x0050, 0x005e,
  0x006b, 0x0079, 0x0086, 0x0093, 0x00a1, 0x00ae, 0x00bc, 0x00c9,
  0x00d6, 0x00e4, 0x00f1, 0x00ff, 0x010c, 0x0119, 0x0127, 0x0134,
  0x0141, 0x014f, 0x015c, 0x0169, 0x0177, 0x0184, 0x0191, 0x019f,
  0x01ac, 0x01b9, 0x01c7, 0x01d4, 0x01e1, 0x01ef, 0x01fc, 0x0209,
  0x0217, 0x0224, 0x0231, 0x023e, 0x024c, 0x0259, 0x0266, 0x0274,
  0x0281, 0x028e, 0x029b, 0x02a8, 0x02b6, 0x02c3, 0x02d0, 0x02dd,
  0x02ea, 0x02f8, 0x0305, 0x0312, 0x031f, 0x032c, 0x0339, 0x0346,

  0x0354, 0x0361, 0x036e, 0x037b, 0x0388, 0x0395, 0x03a2, 0x03af,
  0x03bc, 0x03c9, 0x03d6, 0x03e3, 0x03f0, 0x03fd, 0x040a, 0x0417,
  0x0424, 0x0431, 0x043e, 0x044b, 0x0458, 0x0465, 0x0472, 0x047e,
  0x048b, 0x0498, 0x04a5, 0x04b2, 0x04bf, 0x04cb, 0x04d8, 0x04e5,
  0x04f2, 0x04fe, 0x050b, 0x0518, 0x0525, 0x0531, 0x053e, 0x054b,
  0x0557, 0x0564, 0x0571, 0x057d, 0x058a, 0x0596, 0x05a3, 0x05af,
  0x05bc, 0x05c8, 0x05d5, 0x05e1, 0x05ee, 0x05fa, 0x0607, 0x0613,
  0x061f, 0x062c, 0x0638, 0x0645, 0x0651, 0x065d, 0x0669, 0x0676,

  0x0682, 0x068e, 0x069a, 0x06a7, 0x06b3, 0x06bf, 0x06cb, 0x06d7,
  0x06e3, 0x06ef, 0x06fc, 0x0708, 0x0714, 0x0720, 0x072c, 0x0738,
  0x0744, 0x074f, 0x075b, 0x0767, 0x0773, 0x077f, 0x078b, 0x0797,
  0x07a2, 0x07ae, 0x07ba, 0x07c6, 0x07d1, 0x07dd, 0x07e9, 0x07f4,
  0x0800, 0x080c, 0x0817, 0x0823, 0x082e, 0x083a, 0x0845, 0x0851,
  0x085c, 0x0868, 0x0873, 0x087e, 0x088a, 0x0895, 0x08a0, 0x08ac,
  0x08b7, 0x08c2, 0x08cd, 0x08d8, 0x08e4, 0x08ef, 0x08fa, 0x0905,
  0x0910, 0x091b, 0x0926, 0x0931, 0x093c, 0x0947, 0x0952, 0x095d,

  0x0968, 0x0972, 0x097d, 0x0988, 0x0993, 0x099d, 0x09a8, 0x09b3,
  0x09bd, 0x09c8, 0x09d3, 0x09dd, 0x09e8, 0x09f2, 0x09fd, 0x0a07,
  0x0a12, 0x0a1c, 0x0a26, 0x0a31, 0x0a3b, 0x0a45, 0x0a50, 0x0a5a,
  0x0a64, 0x0a6e, 0x0a78, 0x0a83, 0x0a8d, 0x0a97, 0x0aa1, 0x0aab,
  0x0ab5, 0x0abf, 0x0ac9, 0x0ad3, 0x0adc, 0x0ae6, 0x0af0, 0x0afa,
  0x0b03, 0x0b0d, 0x0b17, 0x0b21, 0x0b2a, 0x0b34, 0x0b3d, 0x0b47,
  0x0b50, 0x0b5a, 0x0b63, 0x0b6d, 0x0b76, 0x0b7f, 0x0b89, 0x0b92,
  0x0b9b, 0x0ba4, 0x0bae, 0x0bb7, 0x0bc0, 0x0bc9, 0x0bd2, 0x0bdb,

  0x0be4, 0x0bed, 0x0bf6, 0x0bff, 0x0c08, 0x0c10, 0x0c19, 0x0c22,
  0x0c2b, 0x0c33, 0x0c3c, 0x0c45, 0x0c4d, 0x0c56, 0x0c5e, 0x0c67,
  0x0c6f, 0x0c78, 0x0c80, 0x0c88, 0x0c91, 0x0c99, 0x0ca1, 0x0ca9,
  0x0cb2, 0x0cba, 0x0cc2, 0x0cca, 0x0cd2, 0x0cda, 0x0ce2, 0x0cea,
  0x0cf2, 0x0cfa, 0x0d01, 0x0d09, 0x0d11, 0x0d19, 0x0d20, 0x0d28,
  0x0d30, 0x0d37, 0x0d3f, 0x0d46, 0x0d4e, 0x0d55, 0x0d5d, 0x0d64,
  0x0d6b, 0x0d72, 0x0d7a, 0x0d81, 0x0d88, 0x0d8f, 0x0d96, 0x0d9d,
  0x0da4, 0x0dab, 0x0db2, 0x0db9, 0x0dc0, 0x0dc7, 0x0dce, 0x0dd5,

  0x0ddb, 0x0de2, 0x0de9, 0x0def, 0x0df6, 0x0dfc, 0x0e03, 0x0e09,
  0x0e10, 0x0e16, 0x0e1c, 0x0e23, 0x0e29, 0x0e2f, 0x0e35, 0x0e3b,
  0x0e42, 0x0e48, 0x0e4e, 0x0e54, 0x0e5a, 0x0e5f, 0x0e65, 0x0e6b,
  0x0e71, 0x0e77, 0x0e7c, 0x0e82, 0x0e88, 0x0e8d, 0x0e93, 0x0e98,
  0x0e9e, 0x0ea3, 0x0ea9, 0x0eae, 0x0eb3, 0x0eb9, 0x0ebe, 0x0ec3,
  0x0ec8, 0x0ecd, 0x0ed2, 0x0ed7, 0x0edc, 0x0ee1, 0x0ee6, 0x0eeb,
  0x0ef0, 0x0ef5, 0x0ef9, 0x0efe, 0x0f03, 0x0f07, 0x0f0c, 0x0f11,
  0x0f15, 0x0f1a, 0x0f1e, 0x0f22, 0x0f27, 0x0f2b, 0x0f2f, 0x0f33,

  0x0f38, 0x0f3c, 0x0f40, 0x0f44, 0x0f48, 0x0f4c, 0x0f50, 0x0f53,
  0x0f57, 0x0f5b, 0x0f5f, 0x0f63, 0x0f66, 0x0f6a, 0x0f6d, 0x0f71,
  0x0f74, 0x0f78, 0x0f7b, 0x0f7f, 0x0f82, 0x0f85, 0x0f88, 0x0f8c,
  0x0f8f, 0x0f92, 0x0f95, 0x0f98, 0x0f9b, 0x0f9e, 0x0fa1, 0x0fa4,
  0x0fa6, 0x0fa9, 0x0fac, 0x0faf, 0x0fb1, 0x0fb4, 0x0fb6, 0x0fb9,
  0x0fbb, 0x0fbe, 0x0fc0, 0x0fc3, 0x0fc5, 0x0fc7, 0x0fc9, 0x0fcb,
  0x0fce, 0x0fd0, 0x0fd2, 0x0fd4, 0x0fd6, 0x0fd8, 0x0fd9, 0x0fdb,
  0x0fdd, 0x0fdf, 0x0fe0, 0x0fe2, 0x0fe4, 0x0fe5, 0x0fe7, 0x0fe8,

  0x0fea, 0x0feb, 0x0fec, 0x0fee, 0x0fef, 0x0ff0, 0x0ff1, 0x0ff2,
  0x0ff3, 0x0ff4, 0x0ff5, 0x0ff6, 0x0ff7, 0x0ff8, 0x0ff9, 0x0ffa,
  0x0ffa, 0x0ffb, 0x0ffc, 0x0ffc, 0x0ffd, 0x0ffd, 0x0ffe, 0x0ffe,
  0x0fff, 0x0fff, 0x0fff, 0x0fff, 0x1000, 0x1000, 0x1000, 0x1000,
  0x1000
};

/* This is CSC = 1/SIN lookup table.  NOTES:
 * 1. The index ranges in value from 0 to 3*PI/2-1.
 * 2. The value obtain from the table has 12 bits of fraction.
 * 3. This value is used to calculate distance from:
 *
 *    distance = distanceY * g_csc_table[angle]
 * 4. 1/SIN(0) and 1/SIN(PI) are not defined.  The value ZERO is place
 *    in the table -- Zero resulting range is a cue to take some other
 *    kind of action!
 * 5. 1/COS(x) = 1/SIN(x + HALFPI)
 */

const int32_t g_csc_table[TWOPI + HALFPI + 1] =
{
  0x00000000, 0x00131940, 0x00098ca3, 0x00065dc6, 0x0004c658,
  0x0003d1e4, 0x00032eed, 0x0002ba86, 0x0002633a, 0x00021f54,
  0x0001e903, 0x0001bc93, 0x0001978b, 0x00017835, 0x00015d5b,
  0x00014615, 0x000131b8, 0x00011fc0, 0x00010fc8, 0x0001017f,
  0x0000f4a3, 0x0000e901, 0x0000de6e, 0x0000d4c7, 0x0000cbee,
  0x0000c3ca, 0x0000bc46, 0x0000b552, 0x0000aedc, 0x0000a8d9,
  0x0000a33d, 0x00009dfd, 0x00009912, 0x00009472, 0x00009019,
  0x00008c00, 0x00008820, 0x00008477, 0x000080ff, 0x00007db5,

  0x00007a95, 0x0000779c, 0x000074c7, 0x00007214, 0x00006f81,
  0x00006d0b, 0x00006ab1, 0x00006870, 0x00006647, 0x00006436,
  0x00006239, 0x00006050, 0x00005e7b, 0x00005cb7, 0x00005b04,
  0x00005961, 0x000057cc, 0x00005647, 0x000054ce, 0x00005363,
  0x00005203, 0x000050b0, 0x00004f67, 0x00004e29, 0x00004cf5,
  0x00004bca, 0x00004aa9, 0x00004990, 0x0000487f, 0x00004777,
  0x00004676, 0x0000457c, 0x0000448a, 0x0000439e, 0x000042b9,
  0x000041d9, 0x00004100, 0x0000402c, 0x00003f5e, 0x00003e95,

  0x00003dd2, 0x00003d13, 0x00003c59, 0x00003ba3, 0x00003af2,
  0x00003a45, 0x0000399c, 0x000038f7, 0x00003856, 0x000037b8,
  0x0000371e, 0x00003688, 0x000035f5, 0x00003565, 0x000034d8,
  0x0000344e, 0x000033c7, 0x00003343, 0x000032c1, 0x00003243,
  0x000031c7, 0x0000314d, 0x000030d6, 0x00003061, 0x00002fef,
  0x00002f7e, 0x00002f10, 0x00002ea4, 0x00002e3a, 0x00002dd2,
  0x00002d6c, 0x00002d08, 0x00002ca6, 0x00002c45, 0x00002be6,
  0x00002b89, 0x00002b2e, 0x00002ad4, 0x00002a7b, 0x00002a25,

  0x000029cf, 0x0000297c, 0x00002929, 0x000028d8, 0x00002888,
  0x0000283a, 0x000027ed, 0x000027a1, 0x00002756, 0x0000270d,
  0x000026c5, 0x0000267e, 0x00002638, 0x000025f3, 0x000025af,
  0x0000256c, 0x0000252a, 0x000024e9, 0x000024aa, 0x0000246b,
  0x0000242d, 0x000023f0, 0x000023b4, 0x00002379, 0x0000233e,
  0x00002305, 0x000022cc, 0x00002294, 0x0000225d, 0x00002227,
  0x000021f1, 0x000021bc, 0x00002188, 0x00002155, 0x00002122,
  0x000020f0, 0x000020bf, 0x0000208e, 0x0000205e, 0x0000202f,

  0x00002000, 0x00001fd2, 0x00001fa4, 0x00001f77, 0x00001f4b,
  0x00001f1f, 0x00001ef4, 0x00001ec9, 0x00001e9f, 0x00001e76,
  0x00001e4d, 0x00001e24, 0x00001dfc, 0x00001dd4, 0x00001dad,
  0x00001d87, 0x00001d61, 0x00001d3b, 0x00001d16, 0x00001cf1,
  0x00001ccd, 0x00001ca9, 0x00001c85, 0x00001c62, 0x00001c40,
  0x00001c1d, 0x00001bfb, 0x00001bda, 0x00001bb9, 0x00001b98,
  0x00001b78, 0x00001b58, 0x00001b39, 0x00001b19, 0x00001afa,
  0x00001adc, 0x00001abe, 0x00001aa0, 0x00001a82, 0x00001a65,

  0x00001a48, 0x00001a2c, 0x00001a10, 0x000019f4, 0x000019d8,
  0x000019bd, 0x000019a2, 0x00001987, 0x0000196d, 0x00001952,
  0x00001939, 0x0000191f, 0x00001906, 0x000018ed, 0x000018d4,
  0x000018bb, 0x000018a3, 0x0000188b, 0x00001873, 0x0000185c,
  0x00001844, 0x0000182d, 0x00001816, 0x00001800, 0x000017e9,
  0x000017d3, 0x000017bd, 0x000017a8, 0x00001792, 0x0000177d,
  0x00001768, 0x00001753, 0x0000173e, 0x0000172a, 0x00001716,
  0x00001702, 0x000016ee, 0x000016da, 0x000016c7, 0x000016b4,

  0x000016a1, 0x0000168e, 0x0000167b, 0x00001669, 0x00001656,
  0x00001644, 0x00001632, 0x00001620, 0x0000160f, 0x000015fd,
  0x000015ec, 0x000015db, 0x000015ca, 0x000015b9, 0x000015a9,
  0x00001598, 0x00001588, 0x00001578, 0x00001568, 0x00001558,
  0x00001548, 0x00001538, 0x00001529, 0x0000151a, 0x0000150b,
  0x000014fc, 0x000014ed, 0x000014de, 0x000014cf, 0x000014c1,
  0x000014b3, 0x000014a5, 0x00001497, 0x00001489, 0x0000147b,
  0x0000146d, 0x00001460, 0x00001452, 0x00001445, 0x00001438,

  0x0000142b, 0x0000141e, 0x00001411, 0x00001405, 0x000013f8,
  0x000013ec, 0x000013df, 0x000013d3, 0x000013c7, 0x000013bb,
  0x000013af, 0x000013a3, 0x00001398, 0x0000138c, 0x00001381,
  0x00001375, 0x0000136a, 0x0000135f, 0x00001354, 0x00001349,
  0x0000133e, 0x00001333, 0x00001329, 0x0000131e, 0x00001314,
  0x0000130a, 0x000012ff, 0x000012f5, 0x000012eb, 0x000012e1,
  0x000012d7, 0x000012ce, 0x000012c4, 0x000012ba, 0x000012b1,
  0x000012a7, 0x0000129e, 0x00001295, 0x0000128c, 0x00001283,

  0x0000127a, 0x00001271, 0x00001268, 0x0000125f, 0x00001257,
  0x0000124e, 0x00001246, 0x0000123d, 0x00001235, 0x0000122d,
  0x00001224, 0x0000121c, 0x00001214, 0x0000120c, 0x00001205,
  0x000011fd, 0x000011f5, 0x000011ed, 0x000011e6, 0x000011de,
  0x000011d7, 0x000011d0, 0x000011c8, 0x000011c1, 0x000011ba,
  0x000011b3, 0x000011ac, 0x000011a5, 0x0000119e, 0x00001198,
  0x00001191, 0x0000118a, 0x00001184, 0x0000117d, 0x00001177,
  0x00001170, 0x0000116a, 0x00001164, 0x0000115e, 0x00001158,

  0x00001151, 0x0000114c, 0x00001146, 0x00001140, 0x0000113a,
  0x00001134, 0x0000112f, 0x00001129, 0x00001123, 0x0000111e,
  0x00001119, 0x00001113, 0x0000110e, 0x00001109, 0x00001103,
  0x000010fe, 0x000010f9, 0x000010f4, 0x000010ef, 0x000010ea,
  0x000010e6, 0x000010e1, 0x000010dc, 0x000010d7, 0x000010d3,
  0x000010ce, 0x000010ca, 0x000010c5, 0x000010c1, 0x000010bd,
  0x000010b8, 0x000010b4, 0x000010b0, 0x000010ac, 0x000010a8,
  0x000010a4, 0x000010a0, 0x0000109c, 0x00001098, 0x00001094,

  0x00001090, 0x0000108d, 0x00001089, 0x00001086, 0x00001082,
  0x0000107f, 0x0000107b, 0x00001078, 0x00001074, 0x00001071,
  0x0000106e, 0x0000106b, 0x00001068, 0x00001064, 0x00001061,
  0x0000105e, 0x0000105c, 0x00001059, 0x00001056, 0x00001053,
  0x00001050, 0x0000104e, 0x0000104b, 0x00001048, 0x00001046,
  0x00001043, 0x00001041, 0x0000103e, 0x0000103c, 0x0000103a,
  0x00001037, 0x00001035, 0x00001033, 0x00001031, 0x0000102f,
  0x0000102d, 0x0000102b, 0x00001029, 0x00001027, 0x00001025,

  0x00001023, 0x00001022, 0x00001020, 0x0000101e, 0x0000101d,
  0x0000101b, 0x00001019, 0x00001018, 0x00001017, 0x00001015,
  0x00001014, 0x00001013, 0x00001011, 0x00001010, 0x0000100f,
  0x0000100e, 0x0000100d, 0x0000100c, 0x0000100b, 0x0000100a,
  0x00001009, 0x00001008, 0x00001007, 0x00001006, 0x00001006,
  0x00001005, 0x00001004, 0x00001004, 0x00001003, 0x00001003,
  0x00001002, 0x00001002, 0x00001001, 0x00001001, 0x00001001,
  0x00001001, 0x00001000, 0x00001000, 0x00001000, 0x00001000,

  0x00001000, 0x00001000, 0x00001000, 0x00001000, 0x00001000,
  0x00001001, 0x00001001, 0x00001001, 0x00001001, 0x00001002,
  0x00001002, 0x00001003, 0x00001003, 0x00001004, 0x00001004,
  0x00001005, 0x00001006, 0x00001006, 0x00001007, 0x00001008,
  0x00001009, 0x0000100a, 0x0000100b, 0x0000100c, 0x0000100d,
  0x0000100e, 0x0000100f, 0x00001010, 0x00001011, 0x00001013,
  0x00001014, 0x00001015, 0x00001017, 0x00001018, 0x00001019,
  0x0000101b, 0x0000101d, 0x0000101e, 0x00001020, 0x00001022,

  0x00001023, 0x00001025, 0x00001027, 0x00001029, 0x0000102b,
  0x0000102d, 0x0000102f, 0x00001031, 0x00001033, 0x00001035,
  0x00001037, 0x0000103a, 0x0000103c, 0x0000103e, 0x00001041,
  0x00001043, 0x00001046, 0x00001048, 0x0000104b, 0x0000104e,
  0x00001050, 0x00001053, 0x00001056, 0x00001059, 0x0000105c,
  0x0000105e, 0x00001061, 0x00001064, 0x00001068, 0x0000106b,
  0x0000106e, 0x00001071, 0x00001074, 0x00001078, 0x0000107b,
  0x0000107f, 0x00001082, 0x00001086, 0x00001089, 0x0000108d,

  0x00001090, 0x00001094, 0x00001098, 0x0000109c, 0x000010a0,
  0x000010a4, 0x000010a8, 0x000010ac, 0x000010b0, 0x000010b4,
  0x000010b8, 0x000010bd, 0x000010c1, 0x000010c5, 0x000010ca,
  0x000010ce, 0x000010d3, 0x000010d7, 0x000010dc, 0x000010e1,
  0x000010e6, 0x000010ea, 0x000010ef, 0x000010f4, 0x000010f9,
  0x000010fe, 0x00001103, 0x00001109, 0x0000110e, 0x00001113,
  0x00001119, 0x0000111e, 0x00001123, 0x00001129, 0x0000112f,
  0x00001134, 0x0000113a, 0x00001140, 0x00001146, 0x0000114c,

  0x00001151, 0x00001158, 0x0000115e, 0x00001164, 0x0000116a,
  0x00001170, 0x00001177, 0x0000117d, 0x00001184, 0x0000118a,
  0x00001191, 0x00001198, 0x0000119e, 0x000011a5, 0x000011ac,
  0x000011b3, 0x000011ba, 0x000011c1, 0x000011c8, 0x000011d0,
  0x000011d7, 0x000011de, 0x000011e6, 0x000011ed, 0x000011f5,
  0x000011fd, 0x00001205, 0x0000120c, 0x00001214, 0x0000121c,
  0x00001224, 0x0000122d, 0x00001235, 0x0000123d, 0x00001246,
  0x0000124e, 0x00001257, 0x0000125f, 0x00001268, 0x00001271,

  0x0000127a, 0x00001283, 0x0000128c, 0x00001295, 0x0000129e,
  0x000012a7, 0x000012b1, 0x000012ba, 0x000012c4, 0x000012ce,
  0x000012d7, 0x000012e1, 0x000012eb, 0x000012f5, 0x000012ff,
  0x0000130a, 0x00001314, 0x0000131e, 0x00001329, 0x00001333,
  0x0000133e, 0x00001349, 0x00001354, 0x0000135f, 0x0000136a,
  0x00001375, 0x00001381, 0x0000138c, 0x00001398, 0x000013a3,
  0x000013af, 0x000013bb, 0x000013c7, 0x000013d3, 0x000013df,
  0x000013ec, 0x000013f8, 0x00001405, 0x00001411, 0x0000141e,

  0x0000142b, 0x00001438, 0x00001445, 0x00001452, 0x00001460,
  0x0000146d, 0x0000147b, 0x00001489, 0x00001497, 0x000014a5,
  0x000014b3, 0x000014c1, 0x000014cf, 0x000014de, 0x000014ed,
  0x000014fc, 0x0000150b, 0x0000151a, 0x00001529, 0x00001538,
  0x00001548, 0x00001558, 0x00001568, 0x00001578, 0x00001588,
  0x00001598, 0x000015a9, 0x000015b9, 0x000015ca, 0x000015db,
  0x000015ec, 0x000015fd, 0x0000160f, 0x00001620, 0x00001632,
  0x00001644, 0x00001656, 0x00001669, 0x0000167b, 0x0000168e,

  0x000016a1, 0x000016b4, 0x000016c7, 0x000016da, 0x000016ee,
  0x00001702, 0x00001716, 0x0000172a, 0x0000173e, 0x00001753,
  0x00001768, 0x0000177d, 0x00001792, 0x000017a8, 0x000017bd,
  0x000017d3, 0x000017e9, 0x00001800, 0x00001816, 0x0000182d,
  0x00001844, 0x0000185c, 0x00001873, 0x0000188b, 0x000018a3,
  0x000018bb, 0x000018d4, 0x000018ed, 0x00001906, 0x0000191f,
  0x00001939, 0x00001952, 0x0000196d, 0x00001987, 0x000019a2,
  0x000019bd, 0x000019d8, 0x000019f4, 0x00001a10, 0x00001a2c,

  0x00001a48, 0x00001a65, 0x00001a82, 0x00001aa0, 0x00001abe,
  0x00001adc, 0x00001afa, 0x00001b19, 0x00001b39, 0x00001b58,
  0x00001b78, 0x00001b98, 0x00001bb9, 0x00001bda, 0x00001bfb,
  0x00001c1d, 0x00001c40, 0x00001c62, 0x00001c85, 0x00001ca9,
  0x00001ccd, 0x00001cf1, 0x00001d16, 0x00001d3b, 0x00001d61,
  0x00001d87, 0x00001dad, 0x00001dd4, 0x00001dfc, 0x00001e24,
  0x00001e4d, 0x00001e76, 0x00001e9f, 0x00001ec9, 0x00001ef4,
  0x00001f1f, 0x00001f4b, 0x00001f77, 0x00001fa4, 0x00001fd2,

  0x00002000, 0x0000202f, 0x0000205e, 0x0000208e, 0x000020bf,
  0x000020f0, 0x00002122, 0x00002155, 0x00002188, 0x000021bc,
  0x000021f1, 0x00002227, 0x0000225d, 0x00002294, 0x000022cc,
  0x00002305, 0x0000233e, 0x00002379, 0x000023b4, 0x000023f0,
  0x0000242d, 0x0000246b, 0x000024aa, 0x000024e9, 0x0000252a,
  0x0000256c, 0x000025af, 0x000025f3, 0x00002638, 0x0000267e,
  0x000026c5, 0x0000270d, 0x00002756, 0x000027a1, 0x000027ed,
  0x0000283a, 0x00002888, 0x000028d8, 0x00002929, 0x0000297c,

  0x000029cf, 0x00002a25, 0x00002a7b, 0x00002ad4, 0x00002b2e,
  0x00002b89, 0x00002be6, 0x00002c45, 0x00002ca6, 0x00002d08,
  0x00002d6c, 0x00002dd2, 0x00002e3a, 0x00002ea4, 0x00002f10,
  0x00002f7e, 0x00002fef, 0x00003061, 0x000030d6, 0x0000314d,
  0x000031c7, 0x00003243, 0x000032c1, 0x00003343, 0x000033c7,
  0x0000344e, 0x000034d8, 0x00003565, 0x000035f5, 0x00003688,
  0x0000371e, 0x000037b8, 0x00003856, 0x000038f7, 0x0000399c,
  0x00003a45, 0x00003af2, 0x00003ba3, 0x00003c59, 0x00003d13,

  0x00003dd2, 0x00003e95, 0x00003f5e, 0x0000402c, 0x00004100,
  0x000041d9, 0x000042b9, 0x0000439e, 0x0000448a, 0x0000457c,
  0x00004676, 0x00004777, 0x0000487f, 0x00004990, 0x00004aa9,
  0x00004bca, 0x00004cf5, 0x00004e29, 0x00004f67, 0x000050b0,
  0x00005203, 0x00005363, 0x000054ce, 0x00005647, 0x000057cc,
  0x00005961, 0x00005b04, 0x00005cb7, 0x00005e7b, 0x00006050,
  0x00006239, 0x00006436, 0x00006647, 0x00006870, 0x00006ab1,
  0x00006d0b, 0x00006f81, 0x00007214, 0x000074c7, 0x0000779c,

  0x00007a95, 0x00007db5, 0x000080ff, 0x00008477, 0x00008820,
  0x00008c00, 0x00009019, 0x00009472, 0x00009911, 0x00009dfd,
  0x0000a33d, 0x0000a8d9, 0x0000aedc, 0x0000b552, 0x0000bc46,
  0x0000c3ca, 0x0000cbee, 0x0000d4c7, 0x0000de6e, 0x0000e901,
  0x0000f4a3, 0x0001017f, 0x00010fc8, 0x00011fc0, 0x000131b7,
  0x00014614, 0x00015d5b, 0x00017836, 0x0001978a, 0x0001bc92,
  0x0001e903, 0x00021f54, 0x0002633a, 0x0002ba86, 0x00032eeb,
  0x0003d1e2, 0x0004c656, 0x00065dc4, 0x00098ca4, 0x00131951,

  0x00000000, 0xffece696, 0xfff67356, 0xfff9a239, 0xfffb39a8,
  0xfffc2e1d, 0xfffcd112, 0xfffd4579, 0xfffd9cc6, 0xfffde0ac,
  0xfffe16fd, 0xfffe436e, 0xfffe6875, 0xfffe87ca, 0xfffea2a5,
  0xfffeb9eb, 0xfffece48, 0xfffee040, 0xfffef038, 0xfffefe81,
  0xffff0b5d, 0xffff16ff, 0xffff2192, 0xffff2b39, 0xffff3412,
  0xffff3c36, 0xffff43ba, 0xffff4aae, 0xffff5124, 0xffff5727,
  0xffff5cc3, 0xffff6203, 0xffff66ee, 0xffff6b8e, 0xffff6fe7,
  0xffff7400, 0xffff77df, 0xffff7b89, 0xffff7f01, 0xffff824b,

  0xffff856b, 0xffff8864, 0xffff8b39, 0xffff8dec, 0xffff907f,
  0xffff92f5, 0xffff954f, 0xffff9790, 0xffff99b8, 0xffff9bca,
  0xffff9dc7, 0xffff9fb0, 0xffffa185, 0xffffa349, 0xffffa4fc,
  0xffffa69f, 0xffffa834, 0xffffa9b9, 0xffffab32, 0xffffac9d,
  0xffffadfd, 0xffffaf50, 0xffffb099, 0xffffb1d7, 0xffffb30b,
  0xffffb436, 0xffffb557, 0xffffb670, 0xffffb781, 0xffffb889,
  0xffffb98a, 0xffffba84, 0xffffbb76, 0xffffbc62, 0xffffbd47,
  0xffffbe27, 0xffffbf00, 0xffffbfd4, 0xffffc0a2, 0xffffc16b,

  0xffffc22e, 0xffffc2ed, 0xffffc3a7, 0xffffc45d, 0xffffc50e,
  0xffffc5bb, 0xffffc664, 0xffffc709, 0xffffc7aa, 0xffffc848,
  0xffffc8e2, 0xffffc978, 0xffffca0b, 0xffffca9b, 0xffffcb28,
  0xffffcbb2, 0xffffcc39, 0xffffccbd, 0xffffcd3f, 0xffffcdbd,
  0xffffce39, 0xffffceb3, 0xffffcf2a, 0xffffcf9f, 0xffffd011,
  0xffffd082, 0xffffd0f0, 0xffffd15c, 0xffffd1c6, 0xffffd22e,
  0xffffd294, 0xffffd2f8, 0xffffd35a, 0xffffd3bb, 0xffffd41a,
  0xffffd477, 0xffffd4d2, 0xffffd52c, 0xffffd585, 0xffffd5db,

  0xffffd631, 0xffffd684, 0xffffd6d7, 0xffffd728, 0xffffd778,
  0xffffd7c6, 0xffffd813, 0xffffd85f, 0xffffd8aa, 0xffffd8f3,
  0xffffd93b, 0xffffd982, 0xffffd9c8, 0xffffda0d, 0xffffda51,
  0xffffda94, 0xffffdad6, 0xffffdb17, 0xffffdb56, 0xffffdb95,
  0xffffdbd3, 0xffffdc10, 0xffffdc4c, 0xffffdc87, 0xffffdcc2,
  0xffffdcfb, 0xffffdd34, 0xffffdd6c, 0xffffdda3, 0xffffddd9,
  0xffffde0f, 0xffffde44, 0xffffde78, 0xffffdeab, 0xffffdede,
  0xffffdf10, 0xffffdf41, 0xffffdf72, 0xffffdfa2, 0xffffdfd1,

  0xffffe000, 0xffffe02e, 0xffffe05c, 0xffffe089, 0xffffe0b5,
  0xffffe0e1, 0xffffe10c, 0xffffe137, 0xffffe161, 0xffffe18a,
  0xffffe1b3, 0xffffe1dc, 0xffffe204, 0xffffe22c, 0xffffe253,
  0xffffe279, 0xffffe29f, 0xffffe2c5, 0xffffe2ea, 0xffffe30f,
  0xffffe333, 0xffffe357, 0xffffe37b, 0xffffe39e, 0xffffe3c0,
  0xffffe3e3, 0xffffe405, 0xffffe426, 0xffffe447, 0xffffe468,
  0xffffe488, 0xffffe4a8, 0xffffe4c7, 0xffffe4e7, 0xffffe506,
  0xffffe524, 0xffffe542, 0xffffe560, 0xffffe57e, 0xffffe59b,

  0xffffe5b8, 0xffffe5d4, 0xffffe5f0, 0xffffe60c, 0xffffe628,
  0xffffe643, 0xffffe65e, 0xffffe679, 0xffffe693, 0xffffe6ae,
  0xffffe6c7, 0xffffe6e1, 0xffffe6fa, 0xffffe713, 0xffffe72c,
  0xffffe745, 0xffffe75d, 0xffffe775, 0xffffe78d, 0xffffe7a4,
  0xffffe7bc, 0xffffe7d3, 0xffffe7ea, 0xffffe800, 0xffffe817,
  0xffffe82d, 0xffffe843, 0xffffe858, 0xffffe86e, 0xffffe883,
  0xffffe898, 0xffffe8ad, 0xffffe8c2, 0xffffe8d6, 0xffffe8ea,
  0xffffe8fe, 0xffffe912, 0xffffe926, 0xffffe939, 0xffffe94c,

  0xffffe95f, 0xffffe972, 0xffffe985, 0xffffe997, 0xffffe9aa,
  0xffffe9bc, 0xffffe9ce, 0xffffe9e0, 0xffffe9f1, 0xffffea03,
  0xffffea14, 0xffffea25, 0xffffea36, 0xffffea47, 0xffffea57,
  0xffffea68, 0xffffea78, 0xffffea88, 0xffffea98, 0xffffeaa8,
  0xffffeab8, 0xffffeac8, 0xffffead7, 0xffffeae6, 0xffffeaf5,
  0xffffeb04, 0xffffeb13, 0xffffeb22, 0xffffeb31, 0xffffeb3f,
  0xffffeb4d, 0xffffeb5b, 0xffffeb69, 0xffffeb77, 0xffffeb85,
  0xffffeb93, 0xffffeba0, 0xffffebae, 0xffffebbb, 0xffffebc8,

  0xffffebd5, 0xffffebe2, 0xffffebef, 0xffffebfb, 0xffffec08,
  0xffffec14, 0xffffec21, 0xffffec2d, 0xffffec39, 0xffffec45,
  0xffffec51, 0xffffec5d, 0xffffec68, 0xffffec74, 0xffffec7f,
  0xffffec8b, 0xffffec96, 0xffffeca1, 0xffffecac, 0xffffecb7,
  0xffffecc2, 0xffffeccd, 0xffffecd7, 0xffffece2, 0xffffecec,
  0xffffecf6, 0xffffed01, 0xffffed0b, 0xffffed15, 0xffffed1f,
  0xffffed29, 0xffffed32, 0xffffed3c, 0xffffed46, 0xffffed4f,
  0xffffed59, 0xffffed62, 0xffffed6b, 0xffffed74, 0xffffed7d,

  0xffffed86, 0xffffed8f, 0xffffed98, 0xffffeda1, 0xffffeda9,
  0xffffedb2, 0xffffedba, 0xffffedc3, 0xffffedcb, 0xffffedd3,
  0xffffeddc, 0xffffede4, 0xffffedec, 0xffffedf4, 0xffffedfb,
  0xffffee03, 0xffffee0b, 0xffffee13, 0xffffee1a, 0xffffee22,
  0xffffee29, 0xffffee30, 0xffffee38, 0xffffee3f, 0xffffee46,
  0xffffee4d, 0xffffee54, 0xffffee5b, 0xffffee62, 0xffffee68,
  0xffffee6f, 0xffffee76, 0xffffee7c, 0xffffee83, 0xffffee89,
  0xffffee90, 0xffffee96, 0xffffee9c, 0xffffeea2, 0xffffeea8,

  0xffffeeaf, 0xffffeeb4, 0xffffeeba, 0xffffeec0, 0xffffeec6,
  0xffffeecc, 0xffffeed1, 0xffffeed7, 0xffffeedd, 0xffffeee2,
  0xffffeee7, 0xffffeeed, 0xffffeef2, 0xffffeef7, 0xffffeefd,
  0xffffef02, 0xffffef07, 0xffffef0c, 0xffffef11, 0xffffef16,
  0xffffef1a, 0xffffef1f, 0xffffef24, 0xffffef29, 0xffffef2d,
  0xffffef32, 0xffffef36, 0xffffef3b, 0xffffef3f, 0xffffef43,
  0xffffef48, 0xffffef4c, 0xffffef50, 0xffffef54, 0xffffef58,
  0xffffef5c, 0xffffef60, 0xffffef64, 0xffffef68, 0xffffef6c,

  0xffffef70, 0xffffef73, 0xffffef77, 0xffffef7a, 0xffffef7e,
  0xffffef81, 0xffffef85, 0xffffef88, 0xffffef8c, 0xffffef8f,
  0xffffef92, 0xffffef95, 0xffffef98, 0xffffef9c, 0xffffef9f,
  0xffffefa2, 0xffffefa4, 0xffffefa7, 0xffffefaa, 0xffffefad,
  0xffffefb0, 0xffffefb2, 0xffffefb5, 0xffffefb8, 0xffffefba,
  0xffffefbd, 0xffffefbf, 0xffffefc2, 0xffffefc4, 0xffffefc6,
  0xffffefc9, 0xffffefcb, 0xffffefcd, 0xffffefcf, 0xffffefd1,
  0xffffefd3, 0xffffefd5, 0xffffefd7, 0xffffefd9, 0xffffefdb,

  0xffffefdd, 0xffffefde, 0xffffefe0, 0xffffefe2, 0xffffefe3,
  0xffffefe5, 0xffffefe7, 0xffffefe8, 0xffffefe9, 0xffffefeb,
  0xffffefec, 0xffffefed, 0xffffefef, 0xffffeff0, 0xffffeff1,
  0xffffeff2, 0xffffeff3, 0xffffeff4, 0xffffeff5, 0xffffeff6,
  0xffffeff7, 0xffffeff8, 0xffffeff9, 0xffffeffa, 0xffffeffa,
  0xffffeffb, 0xffffeffc, 0xffffeffc, 0xffffeffd, 0xffffeffd,
  0xffffeffe, 0xffffeffe, 0xffffefff, 0xffffefff, 0xffffefff,
  0xffffefff, 0xfffff000, 0xfffff000, 0xfffff000, 0xfffff000,

  0xfffff000, 0xfffff000, 0xfffff000, 0xfffff000, 0xfffff000,
  0xffffefff, 0xffffefff, 0xffffefff, 0xffffefff, 0xffffeffe,
  0xffffeffe, 0xffffeffd, 0xffffeffd, 0xffffeffc, 0xffffeffc,
  0xffffeffb, 0xffffeffa, 0xffffeffa, 0xffffeff9, 0xffffeff8,
  0xffffeff7, 0xffffeff6, 0xffffeff5, 0xffffeff4, 0xffffeff3,
  0xffffeff2, 0xffffeff1, 0xffffeff0, 0xffffefef, 0xffffefed,
  0xffffefec, 0xffffefeb, 0xffffefe9, 0xffffefe8, 0xffffefe7,
  0xffffefe5, 0xffffefe3, 0xffffefe2, 0xffffefe0, 0xffffefde,

  0xffffefdd, 0xffffefdb, 0xffffefd9, 0xffffefd7, 0xffffefd5,
  0xffffefd3, 0xffffefd1, 0xffffefcf, 0xffffefcd, 0xffffefcb,
  0xffffefc9, 0xffffefc6, 0xffffefc4, 0xffffefc2, 0xffffefbf,
  0xffffefbd, 0xffffefba, 0xffffefb8, 0xffffefb5, 0xffffefb2,
  0xffffefb0, 0xffffefad, 0xffffefaa, 0xffffefa7, 0xffffefa4,
  0xffffefa2, 0xffffef9f, 0xffffef9c, 0xffffef98, 0xffffef95,
  0xffffef92, 0xffffef8f, 0xffffef8c, 0xffffef88, 0xffffef85,
  0xffffef81, 0xffffef7e, 0xffffef7a, 0xffffef77, 0xffffef73,

  0xffffef70, 0xffffef6c, 0xffffef68, 0xffffef64, 0xffffef60,
  0xffffef5c, 0xffffef58, 0xffffef54, 0xffffef50, 0xffffef4c,
  0xffffef48, 0xffffef43, 0xffffef3f, 0xffffef3b, 0xffffef36,
  0xffffef32, 0xffffef2d, 0xffffef29, 0xffffef24, 0xffffef1f,
  0xffffef1a, 0xffffef16, 0xffffef11, 0xffffef0c, 0xffffef07,
  0xffffef02, 0xffffeefd, 0xffffeef7, 0xffffeef2, 0xffffeeed,
  0xffffeee7, 0xffffeee2, 0xffffeedd, 0xffffeed7, 0xffffeed1,
  0xffffeecc, 0xffffeec6, 0xffffeec0, 0xffffeeba, 0xffffeeb4,

  0xffffeeaf, 0xffffeea8, 0xffffeea2, 0xffffee9c, 0xffffee96,
  0xffffee90, 0xffffee89, 0xffffee83, 0xffffee7c, 0xffffee76,
  0xffffee6f, 0xffffee68, 0xffffee62, 0xffffee5b, 0xffffee54,
  0xffffee4d, 0xffffee46, 0xffffee3f, 0xffffee38, 0xffffee30,
  0xffffee29, 0xffffee22, 0xffffee1a, 0xffffee13, 0xffffee0b,
  0xffffee03, 0xffffedfb, 0xffffedf4, 0xffffedec, 0xffffede4,
  0xffffeddc, 0xffffedd3, 0xffffedcb, 0xffffedc3, 0xffffedba,
  0xffffedb2, 0xffffeda9, 0xffffeda1, 0xffffed98, 0xffffed8f,

  0xffffed86, 0xffffed7d, 0xffffed74, 0xffffed6b, 0xffffed62,
  0xffffed59, 0xffffed4f, 0xffffed46, 0xffffed3c, 0xffffed32,
  0xffffed29, 0xffffed1f, 0xffffed15, 0xffffed0b, 0xffffed01,
  0xffffecf6, 0xffffecec, 0xffffece2, 0xffffecd7, 0xffffeccd,
  0xffffecc2, 0xffffecb7, 0xffffecac, 0xffffeca1, 0xffffec96,
  0xffffec8b, 0xffffec7f, 0xffffec74, 0xffffec68, 0xffffec5d,
  0xffffec51, 0xffffec45, 0xffffec39, 0xffffec2d, 0xffffec21,
  0xffffec14, 0xffffec08, 0xffffebfb, 0xffffebef, 0xffffebe2,

  0xffffebd5, 0xffffebc8, 0xffffebbb, 0xffffebae, 0xffffeba0,
  0xffffeb93, 0xffffeb85, 0xffffeb77, 0xffffeb69, 0xffffeb5b,
  0xffffeb4d, 0xffffeb3f, 0xffffeb31, 0xffffeb22, 0xffffeb13,
  0xffffeb04, 0xffffeaf5, 0xffffeae6, 0xffffead7, 0xffffeac8,
  0xffffeab8, 0xffffeaa8, 0xffffea98, 0xffffea88, 0xffffea78,
  0xffffea68, 0xffffea57, 0xffffea47, 0xffffea36, 0xffffea25,
  0xffffea14, 0xffffea03, 0xffffe9f1, 0xffffe9e0, 0xffffe9ce,
  0xffffe9bc, 0xffffe9aa, 0xffffe997, 0xffffe985, 0xffffe972,

  0xffffe95f, 0xffffe94c, 0xffffe939, 0xffffe926, 0xffffe912,
  0xffffe8fe, 0xffffe8ea, 0xffffe8d6, 0xffffe8c2, 0xffffe8ad,
  0xffffe898, 0xffffe883, 0xffffe86e, 0xffffe858, 0xffffe843,
  0xffffe82d, 0xffffe817, 0xffffe800, 0xffffe7ea, 0xffffe7d3,
  0xffffe7bc, 0xffffe7a4, 0xffffe78d, 0xffffe775, 0xffffe75d,
  0xffffe745, 0xffffe72c, 0xffffe713, 0xffffe6fa, 0xffffe6e1,
  0xffffe6c7, 0xffffe6ae, 0xffffe693, 0xffffe679, 0xffffe65e,
  0xffffe643, 0xffffe628, 0xffffe60c, 0xffffe5f0, 0xffffe5d4,

  0xffffe5b8, 0xffffe59b, 0xffffe57e, 0xffffe560, 0xffffe542,
  0xffffe524, 0xffffe506, 0xffffe4e7, 0xffffe4c7, 0xffffe4a8,
  0xffffe488, 0xffffe468, 0xffffe447, 0xffffe426, 0xffffe405,
  0xffffe3e3, 0xffffe3c0, 0xffffe39e, 0xffffe37b, 0xffffe357,
  0xffffe333, 0xffffe30f, 0xffffe2ea, 0xffffe2c5, 0xffffe29f,
  0xffffe279, 0xffffe253, 0xffffe22c, 0xffffe204, 0xffffe1dc,
  0xffffe1b3, 0xffffe18a, 0xffffe161, 0xffffe137, 0xffffe10c,
  0xffffe0e1, 0xffffe0b5, 0xffffe089, 0xffffe05c, 0xffffe02e,

  0xffffe000, 0xffffdfd1, 0xffffdfa2, 0xffffdf72, 0xffffdf41,
  0xffffdf10, 0xffffdede, 0xffffdeab, 0xffffde78, 0xffffde44,
  0xffffde0f, 0xffffddd9, 0xffffdda3, 0xffffdd6c, 0xffffdd34,
  0xffffdcfb, 0xffffdcc2, 0xffffdc87, 0xffffdc4c, 0xffffdc10,
  0xffffdbd3, 0xffffdb95, 0xffffdb56, 0xffffdb17, 0xffffdad6,
  0xffffda94, 0xffffda51, 0xffffda0d, 0xffffd9c8, 0xffffd982,
  0xffffd93b, 0xffffd8f3, 0xffffd8aa, 0xffffd85f, 0xffffd813,
  0xffffd7c6, 0xffffd778, 0xffffd728, 0xffffd6d7, 0xffffd684,

  0xffffd631, 0xffffd5db, 0xffffd585, 0xffffd52c, 0xffffd4d2,
  0xffffd477, 0xffffd41a, 0xffffd3bb, 0xffffd35a, 0xffffd2f8,
  0xffffd294, 0xffffd22e, 0xffffd1c6, 0xffffd15c, 0xffffd0f0,
  0xffffd082, 0xffffd011, 0xffffcf9f, 0xffffcf2a, 0xffffceb3,
  0xffffce39, 0xffffcdbd, 0xffffcd3f, 0xffffccbd, 0xffffcc39,
  0xffffcbb2, 0xffffcb28, 0xffffca9b, 0xffffca0b, 0xffffc978,
  0xffffc8e2, 0xffffc848, 0xffffc7aa, 0xffffc709, 0xffffc664,
  0xffffc5bb, 0xffffc50e, 0xffffc45d, 0xffffc3a7, 0xffffc2ed,

  0xffffc22e, 0xffffc16b, 0xffffc0a2, 0xffffbfd4, 0xffffbf00,
  0xffffbe27, 0xffffbd47, 0xffffbc62, 0xffffbb76, 0xffffba84,
  0xffffb98a, 0xffffb889, 0xffffb781, 0xffffb670, 0xffffb557,
  0xffffb436, 0xffffb30b, 0xffffb1d7, 0xffffb099, 0xffffaf50,
  0xffffadfd, 0xffffac9d, 0xffffab32, 0xffffa9b9, 0xffffa834,
  0xffffa69f, 0xffffa4fc, 0xffffa349, 0xffffa185, 0xffff9fb0,
  0xffff9dc7, 0xffff9bca, 0xffff99b8, 0xffff9790, 0xffff954f,
  0xffff92f5, 0xffff907f, 0xffff8dec, 0xffff8b39, 0xffff8864,

  0xffff856b, 0xffff824b, 0xffff7f01, 0xffff7b89, 0xffff77df,
  0xffff7400, 0xffff6fe7, 0xffff6b8e, 0xffff66ef, 0xffff6203,
  0xffff5cc3, 0xffff5727, 0xffff5124, 0xffff4aae, 0xffff43ba,
  0xffff3c36, 0xffff3413, 0xffff2b39, 0xffff2192, 0xffff16ff,
  0xffff0b5d, 0xfffefe82, 0xfffef038, 0xfffee040, 0xfffece48,
  0xfffeb9eb, 0xfffea2a5, 0xfffe87ca, 0xfffe6876, 0xfffe436e,
  0xfffe16fe, 0xfffde0ad, 0xfffd9cc7, 0xfffd457b, 0xfffcd114,
  0xfffc2e1c, 0xfffb39a7, 0xfff9a238, 0xfff67354, 0xffece743,

  0x00000000, 0x001319a4, 0x00098cb8, 0x00065dcd, 0x0004c65c,
  0x0003d1e6, 0x00032eee, 0x0002ba86, 0x00026339, 0x00021f54,
  0x0001e902, 0x0001bc94, 0x0001978b, 0x00017836, 0x00015d5b,
  0x00014615, 0x000131b8, 0x00011fc0, 0x00010fc8, 0x0001017f,
  0x0000f4a3, 0x0000e901, 0x0000de6e, 0x0000d4c7, 0x0000cbee,
  0x0000c3ca, 0x0000bc46, 0x0000b552, 0x0000aedc, 0x0000a8d9,
  0x0000a33d, 0x00009dfd, 0x00009911, 0x00009472, 0x00009019,
  0x00008c00, 0x00008821, 0x00008477, 0x000080ff, 0x00007db5,

  0x00007a95, 0x0000779c, 0x000074c7, 0x00007214, 0x00006f81,
  0x00006d0b, 0x00006ab1, 0x00006870, 0x00006648, 0x00006436,
  0x00006239, 0x00006050, 0x00005e7b, 0x00005cb7, 0x00005b04,
  0x00005961, 0x000057cc, 0x00005647, 0x000054ce, 0x00005363,
  0x00005203, 0x000050b0, 0x00004f67, 0x00004e29, 0x00004cf5,
  0x00004bca, 0x00004aa9, 0x00004990, 0x0000487f, 0x00004777,
  0x00004676, 0x0000457c, 0x0000448a, 0x0000439e, 0x000042b9,
  0x000041d9, 0x00004100, 0x0000402c, 0x00003f5e, 0x00003e95,

  0x00003dd2, 0x00003d13, 0x00003c59, 0x00003ba3, 0x00003af2,
  0x00003a45, 0x0000399c, 0x000038f7, 0x00003856, 0x000037b8,
  0x0000371e, 0x00003688, 0x000035f5, 0x00003565, 0x000034d8,
  0x0000344e, 0x000033c7, 0x00003343, 0x000032c1, 0x00003243,
  0x000031c7, 0x0000314d, 0x000030d6, 0x00003061, 0x00002fef,
  0x00002f7e, 0x00002f10, 0x00002ea4, 0x00002e3a, 0x00002dd2,
  0x00002d6c, 0x00002d08, 0x00002ca6, 0x00002c45, 0x00002be6,
  0x00002b89, 0x00002b2e, 0x00002ad4, 0x00002a7b, 0x00002a25,

  0x000029cf, 0x0000297c, 0x00002929, 0x000028d8, 0x00002888,
  0x0000283a, 0x000027ed, 0x000027a1, 0x00002756, 0x0000270d,
  0x000026c5, 0x0000267e, 0x00002638, 0x000025f3, 0x000025af,
  0x0000256c, 0x0000252a, 0x000024e9, 0x000024aa, 0x0000246b,
  0x0000242d, 0x000023f0, 0x000023b4, 0x00002379, 0x0000233e,
  0x00002305, 0x000022cc, 0x00002294, 0x0000225d, 0x00002227,
  0x000021f1, 0x000021bc, 0x00002188, 0x00002155, 0x00002122,
  0x000020f0, 0x000020bf, 0x0000208e, 0x0000205e, 0x0000202f,

  0x00002000, 0x00001fd2, 0x00001fa4, 0x00001f77, 0x00001f4b,
  0x00001f1f, 0x00001ef4, 0x00001ec9, 0x00001e9f, 0x00001e76,
  0x00001e4d, 0x00001e24, 0x00001dfc, 0x00001dd4, 0x00001dad,
  0x00001d87, 0x00001d61, 0x00001d3b, 0x00001d16, 0x00001cf1,
  0x00001ccd, 0x00001ca9, 0x00001c85, 0x00001c62, 0x00001c40,
  0x00001c1d, 0x00001bfb, 0x00001bda, 0x00001bb9, 0x00001b98,
  0x00001b78, 0x00001b58, 0x00001b39, 0x00001b19, 0x00001afa,
  0x00001adc, 0x00001abe, 0x00001aa0, 0x00001a82, 0x00001a65,

  0x00001a48, 0x00001a2c, 0x00001a10, 0x000019f4, 0x000019d8,
  0x000019bd, 0x000019a2, 0x00001987, 0x0000196d, 0x00001952,
  0x00001939, 0x0000191f, 0x00001906, 0x000018ed, 0x000018d4,
  0x000018bb, 0x000018a3, 0x0000188b, 0x00001873, 0x0000185c,
  0x00001844, 0x0000182d, 0x00001816, 0x00001800, 0x000017e9,
  0x000017d3, 0x000017bd, 0x000017a8, 0x00001792, 0x0000177d,
  0x00001768, 0x00001753, 0x0000173e, 0x0000172a, 0x00001716,
  0x00001702, 0x000016ee, 0x000016da, 0x000016c7, 0x000016b4,

  0x000016a1, 0x0000168e, 0x0000167b, 0x00001669, 0x00001656,
  0x00001644, 0x00001632, 0x00001620, 0x0000160f, 0x000015fd,
  0x000015ec, 0x000015db, 0x000015ca, 0x000015b9, 0x000015a9,
  0x00001598, 0x00001588, 0x00001578, 0x00001568, 0x00001558,
  0x00001548, 0x00001538, 0x00001529, 0x0000151a, 0x0000150b,
  0x000014fc, 0x000014ed, 0x000014de, 0x000014cf, 0x000014c1,
  0x000014b3, 0x000014a5, 0x00001497, 0x00001489, 0x0000147b,
  0x0000146d, 0x00001460, 0x00001452, 0x00001445, 0x00001438,

  0x0000142b, 0x0000141e, 0x00001411, 0x00001405, 0x000013f8,
  0x000013ec, 0x000013df, 0x000013d3, 0x000013c7, 0x000013bb,
  0x000013af, 0x000013a3, 0x00001398, 0x0000138c, 0x00001381,
  0x00001375, 0x0000136a, 0x0000135f, 0x00001354, 0x00001349,
  0x0000133e, 0x00001333, 0x00001329, 0x0000131e, 0x00001314,
  0x0000130a, 0x000012ff, 0x000012f5, 0x000012eb, 0x000012e1,
  0x000012d7, 0x000012ce, 0x000012c4, 0x000012ba, 0x000012b1,
  0x000012a7, 0x0000129e, 0x00001295, 0x0000128c, 0x00001283,

  0x0000127a, 0x00001271, 0x00001268, 0x0000125f, 0x00001257,
  0x0000124e, 0x00001246, 0x0000123d, 0x00001235, 0x0000122d,
  0x00001224, 0x0000121c, 0x00001214, 0x0000120c, 0x00001205,
  0x000011fd, 0x000011f5, 0x000011ed, 0x000011e6, 0x000011de,
  0x000011d7, 0x000011d0, 0x000011c8, 0x000011c1, 0x000011ba,
  0x000011b3, 0x000011ac, 0x000011a5, 0x0000119e, 0x00001198,
  0x00001191, 0x0000118a, 0x00001184, 0x0000117d, 0x00001177,
  0x00001170, 0x0000116a, 0x00001164, 0x0000115e, 0x00001158,

  0x00001151, 0x0000114c, 0x00001146, 0x00001140, 0x0000113a,
  0x00001134, 0x0000112f, 0x00001129, 0x00001123, 0x0000111e,
  0x00001119, 0x00001113, 0x0000110e, 0x00001109, 0x00001103,
  0x000010fe, 0x000010f9, 0x000010f4, 0x000010ef, 0x000010ea,
  0x000010e6, 0x000010e1, 0x000010dc, 0x000010d7, 0x000010d3,
  0x000010ce, 0x000010ca, 0x000010c5, 0x000010c1, 0x000010bd,
  0x000010b8, 0x000010b4, 0x000010b0, 0x000010ac, 0x000010a8,
  0x000010a4, 0x000010a0, 0x0000109c, 0x00001098, 0x00001094,

  0x00001090, 0x0000108d, 0x00001089, 0x00001086, 0x00001082,
  0x0000107f, 0x0000107b, 0x00001078, 0x00001074, 0x00001071,
  0x0000106e, 0x0000106b, 0x00001068, 0x00001064, 0x00001061,
  0x0000105e, 0x0000105c, 0x00001059, 0x00001056, 0x00001053,
  0x00001050, 0x0000104e, 0x0000104b, 0x00001048, 0x00001046,
  0x00001043, 0x00001041, 0x0000103e, 0x0000103c, 0x0000103a,
  0x00001037, 0x00001035, 0x00001033, 0x00001031, 0x0000102f,
  0x0000102d, 0x0000102b, 0x00001029, 0x00001027, 0x00001025,

  0x00001023, 0x00001022, 0x00001020, 0x0000101e, 0x0000101d,
  0x0000101b, 0x00001019, 0x00001018, 0x00001017, 0x00001015,
  0x00001014, 0x00001013, 0x00001011, 0x00001010, 0x0000100f,
  0x0000100e, 0x0000100d, 0x0000100c, 0x0000100b, 0x0000100a,
  0x00001009, 0x00001008, 0x00001007, 0x00001006, 0x00001006,
  0x00001005, 0x00001004, 0x00001004, 0x00001003, 0x00001003,
  0x00001002, 0x00001002, 0x00001001, 0x00001001, 0x00001001,
  0x00001001, 0x00001000, 0x00001000, 0x00001000, 0x00001000,

  0x00001000
};
